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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.