Moving from PHP4 to PHP5
I recently moved my timesheet program from a PHP 4 server to a PHP 5 server. Neither server is in a shared environment as both are owned by the company I work for. I believe the version I have is 1.2.2 and it is heavily modified (it worked just fine before the move).
The problem I have is that after moving, I can no longer login. I am sure my username/pw is correct because I use it 3+ times a day. Also, I'm pretty sure that all the files are in tact because I used Plesk's migration manager to move everything from one server to the next.
My guess is that there is a required PHP setting that is different from PHP4 to PHP5 (register globals, long arrays, etc.), but I have no idea what it is.
Does anyone else have an idea?
Thanks,
Pat
Comments
koolie:
The problem was that this program is old as sh**. Really....
The code was originally written for PHP3 & MySQL 3. The program also uses the PASSWORD() function in MySQL which was changed/deprecated in MySQL 4.1.
How to fix it...
In database_credentials.inc, change:
$DATABASE_PASSWORD_FUNCTION = "password";to
$DATABASE_PASSWORD_FUNCTION = "old_password";That's it!
tommo:
I am in the process of making Timesheet Next Gen PHP5 compatible, have a look at SVN /branches/timesheet.ng-1.4.x for a working version under PHP5.
The biggest problem I had was with short php tags i.e. "<? ?>" instead of "<?php ?>". There is probably a php.ini setting that controls this, but I would like it to work out of the box, as much as possible.
Can you tell me what Plesk is? (I don't have time right now to look it up)
Cheers
koolie:
I understand the desire to update the short tags, but that is not my problem. I already have short tags enabled on our php5 server.
Any ideas what else it could be? We own our servers, so I have access to change whatever might be needed.
Thanks.
koolie:
Plesk is a type of control panel - similar to cPanel. It has a migratory function that takes all of the databases, email accounts, and files and transfers them to another server.