dvharrison Posted August 30, 2014 Share Posted August 30, 2014 Hi 5 months ago we upgraded the software to 2.3.3.4 as our server will shortly be upgraded to PHP 5.4 and there have been no problems since then. However, a few days ago, we were getting an 500 error message when we logged into our Admin panel. We have since gone through all the upgrade instructions for 2.3.3.4, just to make doubly sure that we had done everything properly. We hadn't, but we now have. We tested the site yesterday afternoon and it worked fine and it also worked fine on PHP 5.4. Yesterday evening we couldn't access the admin panel again and instead got a 500 error page. The main section of error message read like this [30-Aug-2014 08:57:06 Europe/London] PHP Warning: require(includes/languages/.php): failed to open stream: No such file or directory in /admin/includes/application_top.php on line 168[30-Aug-2014 08:57:06 Europe/London] PHP Warning: require(includes/languages/.php): failed to open stream: No such file or directory in /admin/includes/application_top.php on line 168[30-Aug-2014 08:57:06 Europe/London] PHP Fatal error: require(): Failed opening required 'includes/languages/.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /admin/includes/application_top.php on line 168 I have gone through http://www.oscommerce.com/forums/topic/358990-fatal-error-require-functionrequire-failed-opening-required-includeslanguagesenglishphp-include-pathusrlibphpusrlocallibphp/ and admin/includes/languages/english.php is in the correct place with the correct permissions. I guess the first question is is OSCommerce 2.3.3.4 written in PHP5.4? The other add-ons we use are : Sitemonitor (latest version) GoogleBase (latest version) Related products (latest version) Cross Sell Products (latest version) EasyPopulate (latest version) Front Page (which I think is part of the software) Please could anyone help or advise? I look forward to hearing something soon (I hope!). Deb Debbie Harrison Link to comment Share on other sites More sharing options...
dvharrison Posted August 30, 2014 Author Share Posted August 30, 2014 I should also add that the site works ok now we have reverted back to PHP 5.3 but this is only a temporary measure. Debbie Harrison Link to comment Share on other sites More sharing options...
Mort-lemur Posted August 30, 2014 Share Posted August 30, 2014 @@dvharrison hi 2.3.3.4 works fine on php 5.4 mine was running on php 5.4.31 Can you post admin/includes/application_top.php line 168? Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members. Link to comment Share on other sites More sharing options...
dvharrison Posted August 30, 2014 Author Share Posted August 30, 2014 Hi @@Mort-lemur Sure its: require(DIR_WS_LANGUAGES . $language . '.php'); The whole section for language translations is // include the language translations$_system_locale_numeric = setlocale(LC_NUMERIC, 0);require(DIR_WS_LANGUAGES . $language . '.php');setlocale(LC_NUMERIC, $_system_locale_numeric); // Prevent LC_ALL from setting LC_NUMERIC to a locale with 1,0 float/decimal values instead of 1.0 (see bug #634) Which was upgraded from http://library.oscommerce.com/Online&en&oscom_2_3&release_notes&v2_3_3_4 Hope this helps. Debbie Harrison Link to comment Share on other sites More sharing options...
tgely Posted August 30, 2014 Share Posted August 30, 2014 @@dvharrisonthere could be language configuration missmatch.I have no imagination but you can try the following.1. try this/admin/login.php?language=enif no susccess then2. look into languages table in phpMyadminIs there installed language?if no you should install english (recover from table backup)pls refer to us what you find. osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Link to comment Share on other sites More sharing options...
Mort-lemur Posted August 30, 2014 Share Posted August 30, 2014 @@dvharrison just a wild shot - but you did modify both application_top.php files and upload them back to the correct locations? Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members. Link to comment Share on other sites More sharing options...
dvharrison Posted August 30, 2014 Author Share Posted August 30, 2014 Hi The only language in place in languages table is English 1 English en icon.gif english 1 the login.php?language=en made no difference on php 5.4 setup. I do have a new warning however: [30-Aug-2014 15:28:15 Europe/London] PHP Warning: http_build_query() [<a href='function.http-build-query'>function.http-build-query</a>]: Parameter 1 expected to be Array or Object. Incorrect value given in /admin/login.php on line 63 Also I have SEO Urls 5 installed but it has been disabled. Debbie Harrison Link to comment Share on other sites More sharing options...
dvharrison Posted August 30, 2014 Author Share Posted August 30, 2014 @@Mort-lemur They are definitely in the correct places. I used the compare form the upgrade file for 2.3.3.4 However there are a lot of add-ons for the SEO URLS 5 in the includes/application_top.php Can I send it to you or post it here? Debbie Harrison Link to comment Share on other sites More sharing options...
dvharrison Posted August 30, 2014 Author Share Posted August 30, 2014 Also says compatability is PHP 5.2/ 5.3 http://addons.oscommerce.com/info/7704/v,23 Could this be the issue? Debbie Harrison Link to comment Share on other sites More sharing options...
Bob Terveuren Posted August 30, 2014 Share Posted August 30, 2014 Hi - try this suggestion Link to comment Share on other sites More sharing options...
Mort-lemur Posted August 30, 2014 Share Posted August 30, 2014 @@dvharrison it says in the intro to that mod : ( PHP 4 will NOT work ) Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members. Link to comment Share on other sites More sharing options...
dvharrison Posted August 30, 2014 Author Share Posted August 30, 2014 @@Mort-lemur The server has been upgraded to PHP 5.4. Not PHP 4 Debbie Harrison Link to comment Share on other sites More sharing options...
burt Posted August 30, 2014 Share Posted August 30, 2014 osCommerce works well with php5.4, in fact I have it working on php5.6, without issue. When you upgraded your software to 2.3.3.4, did you do it properly, that is: 2.3.1 > 2.3.2 > 2.3.3 > 2.3.3.1 > 2.3.3.2 > 2.3.3.3 > 2.3.3.4 Many people just go: 2.3.1 > 2.3.3.4 (or find some other way to shortcut the process). Link to comment Share on other sites More sharing options...
Mort-lemur Posted August 30, 2014 Share Posted August 30, 2014 @@dvharrison whoops sorry miss-read the version.... Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members. Link to comment Share on other sites More sharing options...
dvharrison Posted August 30, 2014 Author Share Posted August 30, 2014 @@burt I am sure I did do it step by step, but on retracing my steps I did find a few amendments that hadn't been made in 2.3.3.4 @@Bob Terveuren It did work, but now when I login I get this message: Error!Unable to determine the page link!Function used:tep_href_link('', '', 'NONSSL') I also get the error message: [30-Aug-2014 17:51:14 Europe/London] PHP Warning: http_build_query(): Parameter 1 expected to be Array or Object. Incorrect value given in admin/login.php on line 63 eeek! :wacko: Debbie Harrison Link to comment Share on other sites More sharing options...
tgely Posted August 30, 2014 Share Posted August 30, 2014 @@burt I am sure I did do it step by step, but on retracing my steps I did find a few amendments that hadn't been made in 2.3.3.4 @@Bob Terveuren It did work, but now when I login I get this message: I also get the error message: eeek! :wacko: Typical session missmatch. Could you login with another browser? osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Link to comment Share on other sites More sharing options...
MrPhil Posted September 1, 2014 Share Posted September 1, 2014 require(includes/languages/.php): failed to open streammeans that the $language variable in application_top.php is not being set. This means you messed up the upgrade process somewhere, as it was fixed somewhere in the 2.3.3.x levels. Get a copy of both application_top.php files (they're different!) from a new copy of 2.3.3.4 and compare them to your copies. There will be a difference in them, probably in the neighborhood of language setting. It's also not uncommon to switch the two during work on the system, leading to all sorts of problems. Make sure you didn't do that! Link to comment Share on other sites More sharing options...
dvharrison Posted September 1, 2014 Author Share Posted September 1, 2014 @@Gergely I have logged in with another browser and logged in using a completely different PC and I get the same message: Error!Unable to determine the page link!Function used:tep_href_link('', '', 'NONSSL') error_log reads [01-Sep-2014 06:56:02 Europe/London] PHP Warning: http_build_query(): Parameter 1 expected to be Array or Object. Incorrect value given in /admin/login.php on line 63 Line 63 reads: $get_string = http_build_query($redirect_origin['get']); In the section if (function_exists('http_build_query')) { $get_string = http_build_query($redirect_origin['get']); } Debbie Harrison Link to comment Share on other sites More sharing options...
♥joli1811 Posted September 1, 2014 Share Posted September 1, 2014 Ho Debbie, Long shot here but go to your phpmyadmin and truncate your sessions table Regards Joli To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
♥joli1811 Posted September 1, 2014 Share Posted September 1, 2014 Read on a French forum worth a try https://clients.desmondes.com/knowledgebase/449/Erreur-oscommerce---httpbuildquery-parameter-1-expected-to-be-array-or-object.html login.php file in your admin directory get it if (tep_session_is_registered ('redirect_origin')) { $ Page = $ redirect_origin ['page']; $ Get_string = ''; if (function_exists ('http_build_query')) { Get_string http_build_query = $ ($ redirect_origin ['get']); } tep_session_unregister ('redirect_origin'); tep_redirect (tep_href_link ($ page, $ get_string)); Else {} tep_redirect (tep_href_link (FILENAME_DEFAULT)); } Replace all by ############################# # Mod for php 5.4 / * if (tep_session_is_registered ('redirect_origin')) { $ Page = $ redirect_origin ['page']; $ Get_string = ''; if (function_exists ('http_build_query')) { Get_string http_build_query = $ ($ redirect_origin ['get']); } tep_session_unregister ('redirect_origin'); tep_redirect (tep_href_link ($ page, $ get_string)); Else {} tep_redirect (tep_href_link (FILENAME_DEFAULT)); } * / tep_redirect ('index.php'); # End mod for php 5.4 To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
♥joli1811 Posted September 1, 2014 Share Posted September 1, 2014 Another fix to test same file but better fix I think if it works https://code.google.com/p/jayaram-project-name/source/browse/trunk/frontend/admin/login.php?r=505 if (tep_session_is_registered('redirect_origin')) { $page = $redirect_origin['page']; $get_string = ''; if (function_exists('http_build_query')) { $get_string = http_build_query($redirect_origin); // http_build_query($redirect_origin['get']); } tep_session_unregister('redirect_origin'); tep_redirect(tep_href_link($page, $get_string)); } else { tep_redirect(tep_href_link(FILENAME_DEFAULT)); To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
dvharrison Posted September 1, 2014 Author Share Posted September 1, 2014 @@burt I had forgotten the 2.3.3.1 > 2.3.3.3 add-ons, but have just tried again and I get the same problem. Debbie Harrison Link to comment Share on other sites More sharing options...
dvharrison Posted September 1, 2014 Author Share Posted September 1, 2014 Ho Debbie, Long shot here but go to your phpmyadmin and truncate your sessions table Regards Joli @@joli1811 Tried it and it doesn't make any difference. on both machines Debbie Harrison Link to comment Share on other sites More sharing options...
dvharrison Posted September 1, 2014 Author Share Posted September 1, 2014 @joli1811 I also tried your page (and updated it from the 2.3.3.3 release notes) and that doesn't work either. Debbie Harrison Link to comment Share on other sites More sharing options...
dvharrison Posted September 1, 2014 Author Share Posted September 1, 2014 Read on a French forum worth a try https://clients.desmondes.com/knowledgebase/449/Erreur-oscommerce---httpbuildquery-parameter-1-expected-to-be-array-or-object.html login.php file in your admin directory get it if (tep_session_is_registered ('redirect_origin')) { $ Page = $ redirect_origin ['page']; $ Get_string = ''; if (function_exists ('http_build_query')) { Get_string http_build_query = $ ($ redirect_origin ['get']); } tep_session_unregister ('redirect_origin'); tep_redirect (tep_href_link ($ page, $ get_string)); Else {} tep_redirect (tep_href_link (FILENAME_DEFAULT)); } Replace all by ############################# # Mod for php 5.4 / * if (tep_session_is_registered ('redirect_origin')) { $ Page = $ redirect_origin ['page']; $ Get_string = ''; if (function_exists ('http_build_query')) { Get_string http_build_query = $ ($ redirect_origin ['get']); } tep_session_unregister ('redirect_origin'); tep_redirect (tep_href_link ($ page, $ get_string)); Else {} tep_redirect (tep_href_link (FILENAME_DEFAULT)); } * / tep_redirect ('index.php'); # End mod for php 5.4 I think that has done it. As I can now log into admin. Fine. I will just check later on that it hasn't changed its minded and reverted back to old tricks. Debbie Harrison Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.