PHP Sessions Not working on server, but are on WAMP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
davidhopkins
Forum Commoner
Posts: 41
Joined: Thu Jun 10, 2010 7:52 am

PHP Sessions Not working on server, but are on WAMP

Post by davidhopkins »

Hello All,

First Post :)

Ok so basically, i got a log in feature and it creates a session to ensure that restricted pages are only viewed by those logged in, and to display data specific to the user.

Now i got it working on my local Wamp Server, everything runs fine, but then when i upload it to my Linx web server, the sessions get a bit messed up. The log in works, because you get directed to the members only page, but a sessions isnt made, and you automatically get directed to a restricted access page.

I know my code is all fine because it works on the wamp server. But i cant seem to configure my Linux web server to accpet sessions in the same way.

Here is the Session phpInfo of my linux webserver.

Image

Any help would be great !
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: PHP Sessions Not working on server, but are on WAMP

Post by Benjamin »

Have you checked the error log? ;)
davidhopkins
Forum Commoner
Posts: 41
Joined: Thu Jun 10, 2010 7:52 am

Re: PHP Sessions Not working on server, but are on WAMP

Post by davidhopkins »

Im sorry im completely new to all this kinda stuff, how would i go about checking that? Where would i find it for a start =\
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: PHP Sessions Not working on server, but are on WAMP

Post by Benjamin »

More than likely your sessions directory does not have write permissions. Please take the time to learn how to enable error reporting and display errors. They will tell you what the problem is. We generally can only speculate as to what the issue is without them anyway.
Post Reply