mikeonamac Posted November 18, 2011 Posted November 18, 2011 I appreciate there have been many questions relating to this, however despite trawling the forums and narrowing the problem down, I have been unable to find a solution.. So a clean install of 3.2.1 went fine, then when I came back to to carry on working on it, both the admin and the front end display this error message. Warning: require(includes/languages/.php) [function.require]: failed to open stream: No such file or directory in /home/******/public_html/eshop/includes/application_top.php on line 279 Fatal error: require() [function.require]: Failed opening required 'includes/languages/.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/******/public_html/eshop/includes/application_top.php on line 279 Obviously the problem lies with includes/languages/.php as there is no filename configured. So I checked app_top around the problem lines and have this // 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'); Which seems fine so onto the database to check the default language entry.. 83 Default Language DEFAULT_LANGUAGE en Default Language 6 0 NULL 2011-10-17 07:47:20 NULL NULL I'm not sure but there must be something simple that I have missed! Many thanks, Mike
♥kymation Posted November 19, 2011 Posted November 19, 2011 osCommerce uses a Session variable or a GET variable for the language. The problem is that the session variable is being set to NULL, which then breaks the code that adds the language files. The proper fix would be to find what is nulling out the session variable and fix that. I haven't been able to find that. I suspect that there may be more than one problem, depending on which Addons you have installed. Anyway, I came up with a fix that seems to work. Find this line in your application_top.php: if (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) { and replace it with this: if (!tep_session_is_registered('language') || $_SESSION['language'] == '' || isset($_GET['language'])) { Regards Jim See my profile for a list of my addons and ways to get support.
mikeonamac Posted November 19, 2011 Author Posted November 19, 2011 Hi Jim, Thanks for the reply, however this doesn't seem to make a difference, same error gets returned... I don't have any addons installed btw Regards, Mike
♥kymation Posted November 19, 2011 Posted November 19, 2011 Did you clear your browser cache and force a reload? This has always worked for me. There were some suggestions in other threads containing fixes for this. I have no experience with those, but maybe one will work for you. Regards Jim See my profile for a list of my addons and ways to get support.
mikeonamac Posted November 20, 2011 Author Posted November 20, 2011 Thanks for the help Jim, however I think it might be time for a fresh install :(
Recommended Posts
Archived
This topic is now archived and is closed to further replies.