Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PHP 4.4 go PHP 5.1 migration problems?


Guest

Recommended Posts

Posted

Switched hosts, old host PHP version 4.4, new host PHP version 5.1

 

Site now broken, giving parse/syntax error unexpected ";" in line 303 of index.php (nothing relevant there)

 

Friend told me to use

if(substr(phpversion(), 0, 1) >= '5') @ini_set('zend.ze1_compatibility_mode', '0');// for PHP 5 compatibility

 

at the top of configure.php and index.php... but that didn't help

 

Thanks

Posted
Switched hosts, old host PHP version 4.4, new host PHP version 5.1

 

Site now broken, giving parse/syntax error unexpected ";" in line 303 of index.php (nothing relevant there)

 

Friend told me to use

if(substr(phpversion(), 0, 1) >= '5') @ini_set('zend.ze1_compatibility_mode', '0');// for PHP 5 compatibility

 

at the top of configure.php and index.php... but that didn't help

 

Thanks

 

After you have the parse error sorted... no idea if this will help but have a look at this contrib: "PHP 5 No Register Globals"

http://www.oscommerce.com/community/contributions,4079/

Posted

PHP 5+ has probelms in general and definately has problems with certain osC sites when various contributions are added. You should downgrade to anything around 4+ but less than 5.

 

Hope that helps

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Posted

Downgraded!

 

Now getting a database error:

 

Warning: mysql_connect(): Access denied for user 'bookstor_osc1'@'localhost' (using password: YES) in /home/bookstor/public_html/oscart/includes/functions/database.php on line 19

Unable to connect to database server!

 

MySQL versions are close.... 4.1.18 on new server, 4.1.19 on old server

 

Site was migrated by making a full root directory backup, so the database information in the config should be precisely the same.

 

Thoughts?

Posted

Check your includes/configure.php file and ensure the database information is correct.

 

Since the site was migrated to a new server something has changed, possibly the db host.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Posted

Well, I've left it up to the new host to figure out the DB problem. Current DB host is set to "localhost" and quite frankly I don't know enough about this stuff to know what else to try.

 

username and password and all that should be the same since this was done using a full backup of the old site, and also I checked mysql in Cpanel and the user and database are there.

Posted

If you don't mind, please report back your host's response for the benefit of other users that may encounter a similar problem. :)

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Posted

yeah they were no help, LOL. They said come ask here!

Posted

That is sad. :( You may want to consider finding a new host with lack of help like that.

 

It has to be a simple difference (e.g. a - instead of an _ or something similar) between your old server and new server.

 

yeah they were no help, LOL. They said come ask here!

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Posted

Yeah I can't figure it out. I installed a fresh OSC installation in my root account on the new host and the settings appear to be the same. I don't know what the deal is.

Posted

FYI on the fix:

 

The answer for me was when they migrated it, something was wrong with the permissions on the database user. I figured this out because the error message referenced the line that inputs host, user, password.

 

If the host was correct (localhost, it was) then that only left a user and password.

 

So, I created a new user, password, and added that user to the database. I then edited configure.php with the new user login information, and it worked!

 

For some reason it thinks configure.php is writable, even though I have it set to read only, so I actually commented out the warning message. If anyone has info on THAT error, it would be nice. But otherwise the commenting out is OK.

 

Thank you Jim for your support :).

Posted

Glad to see you got it sorted out in the end, but Daemonj is right - still change your host if they didn't help you. The were quick enough to take your money weren't they!

 

Also, glad to see you took my advice and downgraded.

 

Good luck

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Posted

Glad to hear that you got it working! :)

 

Good job on resolving the issue. B)

 

Your includes/configure.php file should be set to 444 permissions. If it already is, contact your host to determine why PHP thinks that a file with 444 permissions is writeable. They should be able to at least answer and correct that problem. :-"

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...