Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error - require(includes/languages/.php)


Guest

Recommended Posts

Posted

OK guys, installed osC a couple months ago and after all the initial configuration and such, it was running fine.

 

Then yesterday I noticed that I had a warning "I can write to /configure.php, please check the file permissions" tag on top of every page. Even though the configure.php was already set for 644, anyway, I set it to 444 and the tag was gone.

 

Then came this SAFE MODE script id xxxx can't acess scrpitd id xxxx error. Searched the foruns and turned out that I needed to have a /tmp directory in the main catalog folder. OK, did this problem was gone. Also CHMODed /configure.php back to 644 and it seemed fine.

 

But now, on pages other than the index page, this message appears:

 

Warning: require(includes/languages/.php) [function.require]: failed to open stream: No such file or directory in /home/extreme/public_html/shop/admin/includes/application_top.php on line 148

 

Fatal error: require() [function.require]: Failed opening required 'includes/languages/.php' (include_path='.:/usr/local/lib/php') in /home/extreme/public_html/shop/admin/includes/application_top.php on line 148

 

Something's gone awry it seems. I've checked and rechecked and checked again the configure.php files, the application_top.php file and such. All to no avail. I"ve also tried searching the forums for this specific error, but couldn't find anything conclusive.... :(

 

I think the problem is in here require(includes/languages/.php), note how it's only the extension of the file, where it should read the whole filename. I guess this is what's causing the error. But I can't find a way around it.

 

And this is the part of my application_top.php file where line 285 is located. Line 285 reads:

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

 

I'm thinking that the $language variable is not being set properly. Why, I really don't know.

 

Can someone shed some light on this?

 

Thank you very much in advance! :)

 

 

// set the language
 if (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) {
if (!tep_session_is_registered('language')) {
  tep_session_register('language');
  tep_session_register('languages_id');
}

include(DIR_WS_CLASSES . 'language.php');
$lng = new language();

if (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) {
  $lng->set_language($HTTP_GET_VARS['language']);
} else {
  $lng->get_browser_language();
}

$language = $lng->language['directory'];
$languages_id = $lng->language['id'];
 }

// include the language translations
 require(DIR_WS_LANGUAGES . $language . '.php');

// currency
 if (!tep_session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || ( (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && (LANGUAGE_CURRENCY != $currency) ) ) {
if (!tep_session_is_registered('currency')) tep_session_register('currency');

if (isset($HTTP_GET_VARS['currency'])) {
  if (!$currency = tep_currency_exists($HTTP_GET_VARS['currency'])) $currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;
} else {
  $currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;
}
 }

Posted

I also got this message when attempting a test login...

 

Seems like something's gone really awry... Note the double bars...

 

Warning: require(includes/languages//login.php) [function.require]: failed to open stream: No such file or directory in /home/extreme/public_html/shop/login.php on line 20

 

Fatal error: require() [function.require]: Failed opening required 'includes/languages//login.php' (include_path='.:/usr/local/lib/php') in /home/extreme/public_html/shop/login.php on line 20

 

Everything was working fine for 3 weeks, then all of sudden this stuff happened. I'm suspecting the host has made some changes on their software. That's the only possible explanation I can think of.... :huh:

 

Another thing that's puzzling me is: (include_path='.:/usr/local/lib/php') taken from the error message. I guess this should be the same as the catalog includes directory (/home/extreme/public_html/shop/includes/) wouldn't it?

And I can't find a place to change this setting. Maybe it's the php.ini which I don't have acess (only the host admins do...).

 

Again, can you help me out with this? Please!!! ;)

Posted

Sorry to keep on bumping, but this is very important for me. Can someone please give me some insight into this matter?? Please!! :blush:

Archived

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

×
×
  • Create New...