PDA

View Full Version : PHP_SESSION variables arenīt working after server migration



Rocini
09-22-2009, 11:57 AM
Hi all,

Well, I have some applications in HTML/PHP that was working fine before a migration server (I was on box393 and now on box505). After this, some variables using the PHP_SESSION method, are not working anymore.
Oh, and there is no errors logged in error_log file in this folder showing about this.

To be more specific, on one of my folders under public_html, I have a php.ini that indicates REGISTER_GLOBALS = on, that it usually work.
I checked everything as possible, the entire php.ini, .htaccess to see any issue, but found nothing wrong

For debug purposes, I run a copy of the entire application on a personal server, using Linux/Apache/PHP, including the same php.ini like the one in my Bluehost folder.
With this environment, the application works well. On Bluehost, donīt.

Any changes on the new server (new box) thatīs affecting my code?

Still trying to understand this problem.....

Tks...

redsox9
09-22-2009, 12:02 PM
Have you checked with BH support, since this is a user-to-user forum? Try using LiveChat.

Rocini
09-22-2009, 12:06 PM
Have you checked with BH support, since this is a user-to-user forum? Try using LiveChat.

Well, redsox, I already tried this, but on livechat I received a message where I canīt use it for this type of problem.

redsox9
09-22-2009, 12:35 PM
Not that this might be the issue, but what setting do you have for your PHP configuration under cPanel? Make sure before you make any adjustments that you save a copy of your php.ini file.

Rocini
09-22-2009, 01:03 PM
Yes redsox.....

I made a copy of php.ini before any changes.
I have some variables that are captured through the application and are (or should be) in the PHP_SESSION, as an array item.
Unfortunately, theyīre lost every time I try to get them, and this starts to happen after the migration.
Usually, the REGISTER_GLOBALS controls the way to use them, and I checked the entire php.ini and found nothing wrong.

There is a thing instigating me.... on my local server, for tests, it works. And Iīm using the same php.ini and the environment is the same (LINUX/APACHE/PHP).....


Tks

Rocini
09-23-2009, 08:02 AM
Hi all!

Finally a solution.....

After checking php.ini, ticket open and more, I saw where the problem was....

After the server migration, the php CPanel configuration was checked to use the php main engine, not the php.ini.

I reported this to the support and writing here, I think it be usefull, cause a lot of server migrated can have this or other problems.

I donīt why this happened, but advise users of migrated servers to check all configurations (including CPanel) in any issue case....

Well, thatīs it.... tks a lot, specially redsox , for attention!

redsox9
09-23-2009, 08:22 AM
Glad to hear that you found the issue - you make a valid point, though. I don't know the numbers but, despite the fact that BH takes every precaution to ensure a smooth transition between servers for all its account owners, it's an imperfect world so be aware if and when these migrations occur.