Jump to content

Problems with session variables on .php5 pages


offdarip

Recommended Posts

Most of my website is written in php4. My hosting server has support for both 4 and 5 just by changing file extension. .php which is the default supports 4, .php5 of course supports 5. The problem I am having is that the pages with the .php5 extensions are not recognizing session variables. Is there something I should be doing differently in 5 for my session variables?

 

For example a variable request like this returns 0

 

print $_SESSION['FULLNAME'];

 

Please Help!! Thank you in advance?

I would have a look at session_get_cookie_params firstly in both php 4 and then again in php5 to see if this is the actual problem. If your path is different in each, you might be able to fix it by simply setting them both to use the same path. You would do this using ini_set or better yet, use a .htaccess directive or edit your php.ini files if you have access to them.

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.