PHP5 Upgrade Issues

First and foremost a thank you for anyone that takes the time to read this and offer any insight. Here’s the issue summarized as best as possible:

  • running a somewhat customized osCommerce website just fine for years without issues
  • PHP5 upgrade comes in and the custom PHP.ini previously in place is no longer valid
  • Entire website then had the following error showing up “FATAL ERROR: register_globals is disabled in php.ini, please enable it!” (I say entire website because there is the front-end public version of site and then the administrative area of the site)
  • I go through last night and add all those handy dandy files and get register_globals changed over in the php.ini file
  • Now front end of the website works, but the admin area does not work and the following error is displayed:

[code]Warning: include(includes/languages/english/) [function.include]: failed to open stream: No such file or directory in /home/username/ on line 133

Warning: include() [function.include]: Failed opening ‘includes/languages/english/’ for inclusion (include_path=’.:/usr/local/lib/php:/usr/local/php5/lib/pear’) in /home/username/ on line 133

Fatal error: Cannot re-assign $this in /home/username/ on line 31[/code]

My guess is that it has something to do with something in the new php.ini file that was different in the old one, maybe specifically with the path to pear, but I am really not sure. In the old file, magic_quotes was on and in PHP5 it is off, but changing that had no effect, so once again, not sure.

I’ll stop here and hope that someone can point me in the right direction and please let me know if I can provide any other info.


I was able to fix the fatal error by changing line 31 in /home/username/ from $this = null; to unset($this); as apparently PHP5 does not support $this = null;.

This does remove the fatal error, but the two Warnings are still in place and I believe that those warnings are causing another issue in the fact that the languages are not showing up on the admin now and I’m unable to click through to specific orders and view them one by one.

Any feedback would be greatly appreciated.[hr]
More chatting with myself…

For anyone else having this issue, you’ll also need to turn register_long_arrays from Off to On as this fixed my problem.