Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

include {DIR_WS_LANGUAGES] fails to load - PHP5 problem?


clive

Recommended Posts

I have been running OSC for a number of years on Linux EL3 with no problem.

 

Setup a new server using Fedora 4, apache 2.0.54-10.4, PHP 5.0.4-10.4, Mysql 4.1.14-1 and copied over all the files and imported the databases no problem. I have altered the update.ini file

 

The problem comes when you run the shop or admin it fails to load DIR_WS_LANGUAGES log gives the following:

 

[client ] PHP Warning: main(includes/languages/english/) [<a href='function.main'>function.main</a>]: failed to open stream: No such file or directory in /var/www/html/xxxxxxxx.co.uk/catalog/admin/includes/application_top.php on line 133

[client ] PHP Warning: main() [<a href='function.include'>function.include</a>]: Failed opening 'includes/languages/english/' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/xxxxxxx.co.uk/catalog/admin/includes/application_top.php on line 133

 

I have tried a new install from a fresh download.

 

There is a problem with auto install /catalog/install it fails to load page2 everytime. [There seems to be a number of people with this problem but no answer for it]

I manually set up the config files but the result is the same as above.

 

I have played around with the config files but nothing makes any difference I can only think it is a PHP5 problem as the shops worked perfectly on my old server.

 

I have been trying to sort this out for the past 2 weeks can anybody help?

Link to comment
Share on other sites

  • 4 years later...

Does anyone know the solution to this problem?

 

 

include {DIR_WS_LANGUAGES] fails to load - PHP5 problem?

I have been running OSC for a number of years on Linux EL3 with no problem.

 

Setup a new server using FreeBSD, apache 2.0.54-10.4, PHP 5.0.4-10.4, Mysql 5. and copied over all the files and imported the databases no problem. I have altered the update.ini file

 

The problem comes when you run the admin it fails to load DIR_WS_LANGUAGES log gives the following:

 

[client ] PHP Warning: main(includes/languages/english/) [<a href='function.main'>function.main</a>]: failed to open stream: No such file or directory in /var/www/html/xxxxxxxx.co.uk/catalog/admin/includes/application_top.php on line 133

[client ] PHP Warning: main() [<a href='function.include'>function.include</a>]: Failed opening 'includes/languages/english/' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/xxxxxxx.co.uk/catalog/admin/includes/application_top.php on line 133

 

I have played around with the config files but nothing makes any difference I can only think it is a PHP5 problem as the shops worked perfectly on my old server.

 

I have been trying to sort this out for the past 2 weeks can anybody help?

Link to comment
Share on other sites

Add to .htaccess php_flag register_long_arrays 1

Link to comment
Share on other sites

Add to .htaccess php_flag register_long_arrays 1

 

It actually doesn't call the file which I imagine is english.php It stops at the folder "english/".

 

.htaccess is turned of with "AllowOverride None" in the server configuration file.

 

However, this has been accomplished server wide in the php.ini file: php_flag register_long_arrays 1

Link to comment
Share on other sites

It actually doesn't call the file which I imagine is english.php It stops at the folder "english/".

In the 2005 version of osCommerce the line 133 would look for the language file for the current page:

// include the language translations
 require(DIR_WS_LANGUAGES . $language . '.php');
 $current_page = basename($PHP_SELF);
 if (file_exists(DIR_WS_LANGUAGES . $language . '/' . $current_page)) {
   include(DIR_WS_LANGUAGES . $language . '/' . $current_page); // line 133
 }

Perhaps it would be useful to set $PHP_SELF with a function made by Rob Fisher (FWR Media).

Link to comment
Share on other sites

In the 2005 version of osCommerce the line 133 would look for the language file for the current page:

// include the language translations
require(DIR_WS_LANGUAGES . $language . '.php');
$current_page = basename($PHP_SELF);
if (file_exists(DIR_WS_LANGUAGES . $language . '/' . $current_page)) {
include(DIR_WS_LANGUAGES . $language . '/' . $current_page); // line 133
}

Perhaps it would be useful to set $PHP_SELF with a function made by Rob Fisher (FWR Media).

 

Thanks for the replies!

Those are the exact lines I had in /admin/application_top.php

 

This is what proved to be the cure, at least for me:

// include the language translations

require(DIR_WS_LANGUAGES . $language . '.php');

//$current_page = basename($PHP_SELF);

// 14 December 2009 next line was the elusive fix for my admin display problems!

$current_page = basename($_SERVER["PHP_SELF"]);

if (file_exists(DIR_WS_LANGUAGES . $language . '/' . $current_page)) {

include(DIR_WS_LANGUAGES . $language . '/' . $current_page);

}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...