Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Upgrading PHP 5.4 causing error 500 for my site


sormui

Recommended Posts

Posted

My host company has upgraded to PHP 5.4 that causing my site to get error 500. I updated the deprecated functions e.g. eregi, ereg_replace etc. But now I'm getting this error:

 

[25-Aug-2013 21:56:06 America/Chicago] PHP Warning: require(includes/languages/.php): failed to open stream: No such file or directory in /home/wonderfi/public_html/nimda/includes/application_top.php on line 161

[25-Aug-2013 21:56:06 America/Chicago] PHP Warning: require(includes/languages/.php): failed to open stream: No such file or directory in /home/wonderfi/public_html/nimda/includes/application_top.php on line 161

[25-Aug-2013 21:56:06 America/Chicago] PHP Fatal error: require(): Failed opening required 'includes/languages/.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/wonderfi/public_html/nimda/includes/application_top.php on line 161

 

 

The admin login page seems ok but after I log in, it redirects to nimda/login.php?action=process then it gives me 500. Does anyone know what is wrong? How to fix it? Thanks in advance!

Posted

osCommerce 2.3.3 should work on PHP 5.4, but some addons will not. The warning message that you are getting is for a language bug that was fixed in 2.3.3. Upgrading is probably your best solution.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted

But my site was working fine before my host company upgrading to PHP 5.4. If I don't want to upgrade to 2.3.3, do you know what file need to be fixed for this language bug? application_top.php? or language.php? Actually can I hard-coded the "language/english.php"?

Posted

I believe that the fix for the language bug is in application_top.php, but you should also check includes/functions/sessions.php. These changes may be dependent on other changes in the code, so you may have to chase other bugs if you don't update.

 

There are many security fixes in the new code, as well as bug fixes and general improvements. I can't recommend staying with an older version.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted

But I have quite a bit of add-ons. If I upgrade to 2.3.3, are there lots of work to do? Is there a quick fix for the language bug so my site can restore to be working while I'm trying to upgrade 2.3.3?

Posted

You can hard-code $language and $languages_id in application_top.php if you have only one language installed. Then you will have to fix the other errors caused by running your old code on PHP 5.4.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted

I had the same issue and since I am using only one language, I hard coded $language = 'english'; and $languages_id = 1;

and that solved my problem while I continue with the upgrade to 2.3.3

Posted

I hard coded $language = 'english'; and $languages_id = 1;

in application_top.php but still not solve my problem. Any other files that I need to hard-code it too?

Archived

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

×
×
  • Create New...