jhande Posted September 21, 2010 Posted September 21, 2010 I searched with Google for hours but nothing seems to point me in the right direction. Everything WAS working fine. I have NOT changed anything lately on my local test site. I just tried going to my admin panel and received this error: Warning: require(includes/languages/.php) [function.require]: failed to open stream: No such file or directory in C:\xampp\htdocs\hobbies\admin\includes\application_top.php on line 154 Fatal error: require() [function.require]: Failed opening required 'includes/languages/.php' (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\hobbies\admin\includes\application_top.php on line 154 Tried visiting the catalog side, the home page loaded fine but as soon as I clicked a link I received this error: Warning: require(includes/languages/.php) [function.require]: failed to open stream: No such file or directory in C:\xampp\htdocs\hobbies\includes\application_top.php on line 376 Fatal error: require() [function.require]: Failed opening required 'includes/languages/.php' (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\hobbies\includes\application_top.php on line 376 admin\includes\application_top.php on line 154 = require(DIR_WS_LANGUAGES . $language . '.php'); includes\application_top.php on line 376 = require(DIR_WS_LANGUAGES . $language . '.php'); I have no idea what = (include_path='.;C:\xampp\php\pear\') means...?? I haven't changed anything! I really need some help as now I lost my functioning test site. - :: Jim :: - - My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -
MrPhil Posted September 21, 2010 Posted September 21, 2010 It's looking for file includes/languages/.php, which doesn't exist. It's supposed to be includes/languages/$language.php -- your $language variable is not defined for some reason. Up higher in application_top.php, $language is set. Since it worked before, presumably you have $HTTP_GET_VARS defined, but perhaps the language element isn't defined? Check your error logs to see if there are any complaints about $HTTP_GET_VARS['language'] not existing, or 'set_language()' method not being applied to an object. You might need to print out $language at each step in application_top.php to see why it's undefined. Are you are the current level of 2.2 RC2a, and not something much older? This error has been discussed many, many times. Have you done any search?
jhande Posted September 21, 2010 Author Posted September 21, 2010 Thanks Phil I did search for hours using Google. But everything I came across and checked didn't seem to help my situation. I have osC v2.2 MS2 060817 updated. I checked my error logs and all is fine. What has me really stumped... the test site worked fine the last time I played with it. All I did was add products through admin as normal. - :: Jim :: - - My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -
Jack_mcs Posted September 22, 2010 Posted September 22, 2010 That can occur if the database is damaged so try running a repair on that. Also check the database to be sure the default language option is set. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
jhande Posted September 22, 2010 Author Posted September 22, 2010 Thank you Jack Already checked and all seems fine with the database. I have actually made it as far as the admin > languages ONCE before receiving the error. It still shows English set as default. Could it be something wrong with one or both of the configure.php files? I do remember that I had made some edits to the admin one not too long ago. Although the site worked fine once since... - :: Jim :: - - My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -
Jack_mcs Posted September 22, 2010 Posted September 22, 2010 Could it be something wrong with one or both of the configure.php files? I do remember that I had made some edits to the admin one not too long ago. Although the site worked fine once since... It can be a number of things but if nothing was changed, it seems unlikely. Though I sometimes make so many changes so quickly that I forget all that i"ve done. So perhaps you changed something and didin't realize it. Check that the confiugre is using mysql for the sessions. Also turn off options like gzip compression and cache. If you are loading from a cached file, that could be causing a problem. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
♥kymation Posted September 22, 2010 Posted September 22, 2010 This can happen if the session data is corrupted. Saving session in the database helps, but I still get this error occasionally. As a quick fix, find this code in application_top.php (both of them) $language = $lng->language['directory']; $languages_id = $lng->language['id']; } and add just after // Added to fix $language not detected or incorrectly detected if ($language == '' || $language == 'en') $language = 'english'; Regards Jim See my profile for a list of my addons and ways to get support.
jhande Posted September 22, 2010 Author Posted September 22, 2010 It can be a number of things but if nothing was changed, it seems unlikely. Though I sometimes make so many changes so quickly that I forget all that i"ve done. So perhaps you changed something and didin't realize it. Check that the confiugre is using mysql for the sessions. Also turn off options like gzip compression and cache. If you are loading from a cached file, that could be causing a problem. I do have short term memory lose since my head injury. So I do try to make a backup whenever I edit a file... no backup for configure.php. Sessions are set to mysql, turned off qzip and cache. Still no good. - :: Jim :: - - My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -
jhande Posted September 22, 2010 Author Posted September 22, 2010 This can happen if the session data is corrupted. Saving session in the database helps, but I still get this error occasionally. As a quick fix, find this code in application_top.php (both of them) $language = $lng->language['directory']; $languages_id = $lng->language['id']; } and add just after // Added to fix $language not detected or incorrectly detected if ($language == '' || $language == 'en') $language = 'english'; Regards Jim Thanks Jim That helped so I could get into my admin and check settings, but it returned a new error on the catalog side: Fatal error: Call to a member function add_current_page() on a non-object in C:\xampp\htdocs\hobbies\includes\application_top.php on line 410 - :: Jim :: - - My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -
jhande Posted September 22, 2010 Author Posted September 22, 2010 It's looking for file includes/languages/.php, which doesn't exist. It's supposed to be includes/languages/$language.php -- your $language variable is not defined for some reason. You might need to print out $language at each step in application_top.php to see why it's undefined. I added say( $language['languages'] ); to the below code. // 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']; } say( $language['languages'] ); I received this once the snippet of code was added to the end as above (no results anywhere else in the code). Output from say(). Type is string. ( Exit script: No ) e - :: Jim :: - - My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -
satish Posted September 22, 2010 Posted September 22, 2010 I added say( $language['languages'] ); to the below code. // 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']; } say( $language['languages'] ); I received this once the snippet of code was added to the end as above (no results anywhere else in the code). Output from say(). Type is string. ( Exit script: No ) e Its related to session variables being considered as global variables. Satish Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does.
♥kymation Posted September 22, 2010 Posted September 22, 2010 Yet another session bug. Try the official patch. Try running repair on your sessions table. Regards Jim See my profile for a list of my addons and ways to get support.
jhande Posted September 22, 2010 Author Posted September 22, 2010 WOW more and more patches after all these years. I'm wondering if I shouldn't just wipe the slate clean and start fresh? Is there really much of a difference between my updated 2.2 MS2 version and the latest RC2 version? I did update mine using the 2.2rc2a update.html. Or would it be easier just to replace the database and effected files? - :: Jim :: - - My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -
♥kymation Posted September 23, 2010 Posted September 23, 2010 You have the current release if you've done the RC2a patches. The patch I linked to is from 2.3, which will be out one of these days. Then we get to do another set of patches. No, it never really ends. Regards Jim See my profile for a list of my addons and ways to get support.
jhande Posted September 23, 2010 Author Posted September 23, 2010 The patch doesn't help. I lost my categories menu, they disapeared. I think it's time to just compare files again with my live shop although I did that once already. Maybe I'll just have to uninstall everything, including XAMPP and start all over again. Bah hum these bugs... I want to thank everyone for trying to help, I do appreciate it! - :: Jim :: - - My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -
burt Posted September 23, 2010 Posted September 23, 2010 Set register_long_arrays to true. Set register_globals to true. In your xampp control panel. Then reboot server.
jhande Posted September 23, 2010 Author Posted September 23, 2010 Awesome burt, the reboot did wonders! Thank you so much you're the greatest. One major problem left and I'm not sure if it's related to the previous problem... When I click on any links for my categories or the products in my best seller box I get directed to http://127.0.0.1/xampp/ . I tried playing around with my configure.php but no good other than making a total mess of it I think. define('HTTP_SERVER', 'http://127.0.0.1'); define('HTTPS_SERVER', ''); define('ENABLE_SSL', false); define('HTTP_COOKIE_DOMAIN', 'http://localhost/hobbies/'); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', 'C:/xampp/htdocs/hobbies/'); define('HTTPS_COOKIE_PATH', ''); define('DIR_WS_HTTP_CATALOG', '/hobbies/'); define('DIR_WS_HTTPS_CATALOG', ''); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', 'C:/xampp/htdocs/hobbies/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); So far what I have tested on the admin end works fine except... I had added a column - products_discontinued to the products table which "was" working fine. But now I receive this error: 1054 - Unknown column 'products_discontinued' in 'field list' I checked the database and the column is there. This error now prevents me from updating or adding any products. Any ideas? - :: Jim :: - - My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -
jhande Posted September 25, 2010 Author Posted September 25, 2010 Solved the category and product links. Forgot I had to turn off SEO URL's again... Now to check my categories.php for something amiss with the products_discontined issue. - :: Jim :: - - My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -
jhande Posted September 25, 2010 Author Posted September 25, 2010 1054 - Unknown column 'products_discontinued' in 'field list' I checked the database and the column is there. This error now prevents me from updating or adding any products. Fixed... One too many queries Again, thanks to all that came to my rescue! - :: Jim :: - - My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -
Torg42 Posted September 29, 2010 Posted September 29, 2010 Yet another session bug. Try the official patch. Try running repair on your sessions table. Regards Jim Just wanted to say thanks kymation!!!! The quick fix and the bug fix worked for my client. We have been battling the random blank pages for months. I kept putting it on the back burner, but they had a customer who went ballistic with them. They wanted it fixed so I started looking around and you really helped out. Just goes to show how some helpful info can really make somebodys day!! Thanks a ton, Torg
♥kymation Posted September 30, 2010 Posted September 30, 2010 You're welcome. It's always good to hear that the information helped someone. Regards Jim See my profile for a list of my addons and ways to get support.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.