Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

For God Sakes HELP


patrickbailey1

Recommended Posts

I was loading a contribution (product attributes) and got a ton of errors...i've corrected most of them by loading in original .php pages. Now i get these errors and i cannot figure it out for the life of me:

 

Warning: main(includes/languages/.php): failed to open stream: No such file or directory in /hsphere/local/home/havenbiz/havenelectronics.com/admin/includes/application_top.php on line 130

 

Fatal error: main(): Failed opening required 'includes/languages/.php' (include_path='.:/usr/local/lib/php') in /hsphere/local/home/havenbiz/havenelectronics.com/admin/includes/application_top.php on line 130

 

 

This is line 130 and as far as i can tell its ok...and its orginal:

 

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

 

Any suggestions?

Patrick Bailey

www.DisplayHaven.com

Link to comment
Share on other sites

Based on what you have posted, it seems to me that the $language variable is not being set to a value. Take a look around in applicationtop.php and see where that is supposed to get assigned. Did you not backup everything?

Link to comment
Share on other sites

I backed up everything but i can't get into my backup directory in osCommerce to "restore" it. When i try to go to the main admin page it says these errors. I dont know how to restore it from like webshell....do you?

 

Patrick

Patrick Bailey

www.DisplayHaven.com

Link to comment
Share on other sites

This is the entire thing around line 130:

 

// 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);

Patrick Bailey

www.DisplayHaven.com

Link to comment
Share on other sites

when you use the backup function in the admin panel it does NOT backup your php pages, only the sql to create your database tables and information stored there. When you are playing around with the php files always either copy the file and rename one phpfileold.php or something or copy it to your computer.

 

This is what I have for setting the language:

// 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');

 

Ryan

If I was crafty, this would be a funny signature.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...