Jump to content

Can't get sessions to work on Localhost


McSm1th89

Recommended Posts

Okay, so for around a year now I've been using a local server to test and develope scripts / websites.

 

My setup is apache2.2, php5 and mysql5.1 (i think) and have never had any issues.

 

I've had to uncomment a few things to get everything working (just every now and then as things come up) but recently I've been looking into using sessions to create my first login scripts etc. Simple session hit counters (W3 and other websites use a simple hit counter code as a session example) works online, like when I upload to my host.. but locally it just ignores the sessions.

 

I have my session path as C:/php/sess and when I open the page, a new sess_39729gy2097g32g (or whatever) file is created, but when if I reload.. instead of loading the data from that file, it just creates a new one.

 

I have looked through both php.ini and httpd.conf (apache) to try and find something to change, but with no luck.

 

I've also search online, but very few people seem to have this problem.

 

It's something with how my localhost is set up, as the scripts work online. But even after installing xampp, it gives me the finger and still doesn't work.

 

Anyone have any ideas?

 

Cheers in advance,

Tom.

Link to comment
https://forums.phpfreaks.com/topic/151122-cant-get-sessions-to-work-on-localhost/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.