Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

My site has turned volatile - Help


dvharrison

Recommended Posts

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

@@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

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

@@dvharrison

there could be language configuration missmatch.
I have no imagination but you can try the following.

1. try this

/admin/login.php?language=en

if no susccess then
2. look into languages table in phpMyadmin
Is there installed language?

if no you should install english (recover from table backup)

pls refer to us what you find.

:blink:
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

@@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

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

@@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

@@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

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

@@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

 

 

 

@@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?

:blink:
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

require(includes/languages/.php): failed to open stream
means 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

@@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

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

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

 

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

Archived

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

×
×
  • Create New...