Web Hosting Talk







View Full Version : Some old members can't login my old PHP scripting on New server.


mark0168
06-15-2006, 10:31 AM
I have moved my site to a new server 5 days ago.
I didn't change any part of my PHP scripting.
I think the only difference should be the server and OS.
My old server is under CentOS, PHP 4.3X, MySQL 4.1X with cPanel.
My new server is under Redhat 4.X, PHP 4.32, MySQL 4.1X with Plesk.

Some of my members can't login my site, they said that they can login before we moved our site, but they can't now.
I am sure that they keyin the same ID and Password because my PHP will shows error when they keyin the invalid account.

The solutions I provide with them is to enable receiving cookie, even they said they didn't need to do it in order to login on old server. With cookie enabled, they can login.

My new server hosting told me that some browser won't receive cookie from non-orginal website. They tested with on of my member account to check cookie status, they said cookie is fine. Is it real? I doubt it because it's not my frist time to move. I have never got so many member login problems before. Beside, I have enabled register_globals on that my old server turned it off.

The only lucky thing is most of my members can login normal.

Have anyone ever meet the problem after moving to a new server.
PHP Login scripting failed to some old members on new server?

getcheesy
06-16-2006, 01:02 PM
The only thing I can think of is something to do with session handling, it might be worth checking if that's the same. Either than or maybe problems with globals being turned on->off?

PyroSols
06-16-2006, 03:10 PM
Without more details its hard to say what the exact issue might be. I'd suggest you open up php.ini on both servers and compare the settings on the new one with the old config file.

Look for settings that affect sessions and cookies..

mark0168
06-18-2006, 12:30 PM
Thank you all for your replies.
I do check the information via phpinfo() instead of php.ini.
The four main difference I can see on Session Part are tmp_dir,
old server / current server
register_globals off / on
session.bug_compat_42 on / off
session.gc_divisor 100 / 1000
session.save_path /tmp ||||| /var/xxx

In fact, I turn on register_globals on new server.
If I have not opened register_globals on new server, I can't login my php scripting either.
Should I set session.bug_compat_42 on and shut down register_globals as old server?

I have renamed all the name of session variables about member login on my php scriptings. Hope that works to resolve the problem.

nuk3
06-19-2006, 12:21 AM
Should I set session.bug_compat_42 on and shut down register_globals as old server?.
Yes, set register_globals to off immediately.

cristinz
06-19-2006, 04:41 AM
Yes, set register_globals to off immediately.
Just curious, but why should you set register_globals to off?

arkin
06-19-2006, 02:09 PM
I'm not sure if this was already mentioned, but, the session id is stored in a cookie on the clients computer. This is then matched with the session on the server for the user data to be matched.

This could be a possible reason why when cookies are enabled the login works fine.

mark0168
06-19-2006, 11:31 PM
I'm not sure if this was already mentioned, but, the session id is stored in a cookie on the clients computer. This is then matched with the session on the server for the user data to be matched.


Thanks. I understand that PHP use cookie or url_id to transfer Session.
Most PHP scripting use cookie as the main way to make session works, including mine.

My problem is that I have run my current PHP scripting for years with other hosting fine. Actually, I have used two different hostings before, including VPS and shared hosting.

I can't even login my scripting when I just moved in the new server. The only thing I can do is to open register_globals on new server. For that I know I used session_register() on some pages, it's a old scripting anyway.

Sometimes, members indeed closed their cookie on theri browswers, but I never face so many login tickets since I moved my scripting to my current server even I have turn on register_globals.
I doubt my member was closing their cookie setting while I was moving to my new server.

So I have to doubt that some settings wrong with my current server, the first thing I could figure out was PHP.ini. However, I know less about PHP.ini, I am tring to comare their PHP.ini now. Hope I can figure out why.

The tempary solution I made now is to change all the name of sessions. It stopped me from getting more login tickets, but I worry that might mean my member lost. Because they are gone, they won't give me tickets certainly.

This week, I have found my Alexa traffic rank and keyword rank on Yahoo is sometimes descending.
The feeling is really bad.....