Thanks for your help!
I haven't had any problems with the hosted server, nor other problems besides the sessions with my own PHP version.
I'll try installing another version of php and see what it does.
While searching the forum for an answer to this I noticed some other posts about this very same problem and none of them got solved 🙁
I'm pretty sure the problem is not in my code. To be sure I used the example code for sessions from the php-manual and tested it on both servers. Mine didn't work, hosted server did.