Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Missing file or directory - HELP !


davidflash

Recommended Posts

I am constantly getting the following errors whenever I try to go to the admin section of my site. The frontend works fine... Can any assist ASAP. I tried and tried with no luck. What is missing??

 

The error:

 

"Warning: require(includes/languages/.php) [function.require]: failed to open stream: No such file or directory in /home2/emcomp/public_html/admin/includes/application_top.php on line 130

"

 

ANY ASSISTANCE WILL BE APPRECIATED.

 

Thanks

Link to comment
Share on other sites

Hello

Have you tried to google it?

Nic

 

Yes, It seems that a lot of other sites are indicating the same problem. When you click on the sites' link you see the exact same error. I did however see some solutions offered on other links but they all were dealing with similair problems but not exact.

 

Are there any gurus out there that can point to a possible solution. I put in several hours search os forums with all sort of answers. Can anyone assist!

 

Thanks

Link to comment
Share on other sites

If it is only happening in the admin side of your site then it is probably related to the settings in /admin/includes/configure.php.

 

Have you tried google on

 

site:www.oscommerce.com/forums Warning: require(includes/languages/.php)

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Yes, with no luck. The only concise solution I got was to add $language = "english.php" in the application_top.php script. When I added that line now when I type in xxx.com/admin it goes to the "weclome please sign in customer" screen.

 

This is what I added in the application_top.php in the admin/includes folder.

 

// set the language

$language='english';

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

}

 

The errors stopped as listed in the beginning of this post but it is now going to the Customer login in screen.

 

Gurus I need your input.

 

Any ideas will be appreciated.

 

Searching the forums and web for several hours with no luck.

 

Thanks.

Link to comment
Share on other sites

Yes, with no luck. The only concise solution I got was to add $language = "english.php" in the application_top.php script. When I added that line now when I type in xxx.com/admin it goes to the "weclome please sign in customer" screen.

 

This is what I added in the application_top.php in the admin/includes folder.

 

// set the language

$language='english';

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

}

 

The errors stopped as listed in the beginning of this post but it is now going to the Customer login in screen.

 

Gurus I need your input.

 

Any ideas will be appreciated.

 

Searching the forums and web for several hours with no luck.

 

Thanks.

 

 

I have been searching oscommerce forum and seen a LOT of similar problems. CAN ANYONE figure out why oscommerce is having problems with the "missing language". This seems to be happening quite a lot. Is this a design flaw.

 

As I stated initially I can not access my admin page at all. If I added the code listed above I go striaght to the Customer login page and not the admin login page. When I take the code out I get to original errors message as stated in the begining of this post.

 

Is this a FLAW in oscommerce? Can anyone assist.

 

Thanks.

Link to comment
Share on other sites

Since I can not get any solution (gurus where are you!) as to why I can not login into the admin section due the missing file error:

 

The error:

 

"Warning: require(includes/languages/.php) [function.require]: failed to open stream: No such file or directory in /home2/emcomp/public_html/admin/includes/application_top.php on line 130

"

 

I have a brainstorm. Maybe this might work. I need opinions. I was thinking about unloading a clean installation MS2.2rc2 into a different directory on my server and have ONLY the ADMIN section (where you login) point to the my existing db under my MS2.2 installation. I was thinking on replacing the configure.php file in MS2.2rc2 with the MS2.2 configure file. That way when I go to login into the admin section it will point to the configuration on MS2.2 and not MS2.2rc1.

 

This is the only work around since I have not for the past three days found any resolution to the "can not login into the admin section " yet.

 

Does any think this might work?

 

Thank you in advance.

 

DavidFlash....

Link to comment
Share on other sites

Hi David..

 

as such the error comes because the language has not been initialised..

 

try initialising to just "english"

 

i.e, $language = "english";

 

or any other language you want to be the default language.

 

I am not sure of the root of the problem.. but cant complain oscommerce must be a PHP flaw ( PHP gurus please pardon my ignorance in case I am wrong here )

 

Cheers

Hari

 

Since I can not get any solution (gurus where are you!) as to why I can not login into the admin section due the missing file error:

 

The error:

 

"Warning: require(includes/languages/.php) [function.require]: failed to open stream: No such file or directory in /home2/emcomp/public_html/admin/includes/application_top.php on line 130

"

 

I have a brainstorm. Maybe this might work. I need opinions. I was thinking about unloading a clean installation MS2.2rc2 into a different directory on my server and have ONLY the ADMIN section (where you login) point to the my existing db under my MS2.2 installation. I was thinking on replacing the configure.php file in MS2.2rc2 with the MS2.2 configure file. That way when I go to login into the admin section it will point to the configuration on MS2.2 and not MS2.2rc1.

 

This is the only work around since I have not for the past three days found any resolution to the "can not login into the admin section " yet.

 

Does any think this might work?

 

Thank you in advance.

 

DavidFlash....

Link to comment
Share on other sites

If you would like to further optimise a solution.. you could do one thing to the following code segment:

 

// set the language

$language='english';

if (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) {

if (!tep_session_is_registered('language')) {

 

// include code here to get the default language

tep_session_register('language');

tep_session_register('languages_id');

}

 

 

Cheers

Hari

 

Since I can not get any solution (gurus where are you!) as to why I can not login into the admin section due the missing file error:

 

The error:

 

"Warning: require(includes/languages/.php) [function.require]: failed to open stream: No such file or directory in /home2/emcomp/public_html/admin/includes/application_top.php on line 130

"

 

I have a brainstorm. Maybe this might work. I need opinions. I was thinking about unloading a clean installation MS2.2rc2 into a different directory on my server and have ONLY the ADMIN section (where you login) point to the my existing db under my MS2.2 installation. I was thinking on replacing the configure.php file in MS2.2rc2 with the MS2.2 configure file. That way when I go to login into the admin section it will point to the configuration on MS2.2 and not MS2.2rc1.

 

This is the only work around since I have not for the past three days found any resolution to the "can not login into the admin section " yet.

 

Does any think this might work?

 

Thank you in advance.

 

DavidFlash....

Link to comment
Share on other sites

I already tried:

 

This is what I added in the application_top.php in the admin/includes folder.

 

// set the language

$language='english';

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

}

 

The errors stopped as listed in the beginning of this post but it is now going to the Customer login in screen completely bypassing the admin login in screen When I take it out I get the original errors.

 

Hari, I do not understand when you say coding the default language here???

Link to comment
Share on other sites

..."Warning: require(includes/languages/.php) [function.require]: failed to open stream: No such file or directory in /home2/emcomp/public_html/admin/includes/application_top.php on line 130

"

...

 

this error is caused by:

1. the language class does not return the directory for the (english) language;

2. you do not have this directory at the admin side (includes/lagunages/english);

3. you do nto enter a directory (english) in admin - localisation - languages.

4. the class mentioned in 1 has a problem.

 

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

Since I can not can any solution to my post I was thinking about adding a new fresh install using MS2.2rc2. My question is can I point this new install to my existing database which I am currently using with my broken MS2.2.

 

My thinking is I can access the new install admin without getting that error message then I would have a work-around. Will this DB (MS2.2) work with the coding in MS2.2rc2??

 

Gurus I need some input.

 

Thanks

Link to comment
Share on other sites

your site seems to have some weird problems because even if you put in $language = english there'd still be another even more weird problem: you are redirect to the shop'd log in page as mentioned in your post. i think you would need someone to access and look at your site and it wont take long to find out exactly what has gone wrong

 

in the languages table, there is a field called directory and there must be a value, which is entered in admin - localisation - languages. The $language variable gets its value from the language class (which has nothing to do with session) and it should be the directory, but in your case, it appears to be blank. on the face of it, that means a directory is not entered, or the something wrong with the language class.

 

the old db can be used for the shop front, but for the admin side, the new rc2a has a new table administrator, which you'd need to create and add a admin user/pw manually (if you know how to do it). if you choose to go this way, then i tend to think to be on the safe side, i would create a new db for rc2a in case it over writes your data. but the whole thing becomes a bit complicated as there is no option to install the admin only. all said, it still can be done if you know your way around very well.

 

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

Since I can not can any solution to my post I was thinking about adding a new fresh install using MS2.2rc2. My question is can I point this new install to my existing database which I am currently using with my broken MS2.2.

 

My thinking is I can access the new install admin without getting that error message then I would have a work-around. Will this DB (MS2.2) work with the coding in MS2.2rc2??

 

Gurus I need some input.

 

Thanks

 

 

Make a back up of the complete store including the database and put it in a safe place then go ahead and do a install of the new oscommerce once it is all working, restore the database from the previous version.

Make sure to back up first

If you need to then add an administrators table (which i doubt) here is the code

 

DROP TABLE IF EXISTS administrators;

CREATE TABLE administrators (

id int NOT NULL auto_increment,

user_name varchar(32) binary NOT NULL,

user_password varchar(40) NOT NULL,

PRIMARY KEY (id)

);

 

Nic

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Link to comment
Share on other sites

Fimble, I install MS2.2rc2 and imported the database from MS2.2. The catalog side seems to work fine., the admin side is looking for different field names in the admintration table when I try to access the admin login screen.

 

I blew the db and reinstalled the MS2.2cr2 tables and deleted all the tables EXCEPT the adminstration table, then I imported every table from the MS2.2 db except the administration table.

 

This time when I try login into the admin I was successful, but after accessing different tables on the admin side I realized that some of the coding (on the admin side while accessing tables) in MS2.2rc2 is not compatiable with the tables from MS2.2 . I starting getting errors popping up in the admin's scripts.

 

 

So I am back to square one. What I really want to do is to try to solve the error problems that I originally got in MS2.2:

 

"Warning: require(includes/languages/.php) [function.require]: failed to open stream: No such file or directory in /home2/emcomp/public_html/admin/includes/application_top.php on line 130

"

 

But after several days of search oscommerce forums and googling I resorted to a work-around by trying to maybe used the admin side of MS2.2rc2 and keep using the existing MS2.2 for the catalog side.

 

Question is there any easy way of upgrading from MS2.2 to MS2.2rc2 without making all of those tedious changes per script as the MS2.2cr2 upgrade docs seems to suggest?

 

Or can anyone assist with the initial problem of the :

 

"Warning: require(includes/languages/.php) [function.require]: failed to open stream: No such file or directory in /home2/emcomp/public_html/admin/includes/application_top.php on line 130

"

Thank you in advance.

Link to comment
Share on other sites

After careful accessing all tables while logged in as the admin I only get the following errors when I try to access one of the cusotmers information,

 

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home2/emcomp/public_html/catalog/admin/customers.php on line 733

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home2/emcomp/public_html/catalog/admin/customers.php on line 735

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /home2/emcomp/public_html/catalog/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /home2/emcomp/public_html/catalog/admin/includes/classes/object_info.php on line 18

 

 

Otherwise everything seems to work fine so far.

Link to comment
Share on other sites

i have not the least doubt about:

1. osc 2.2 database can be used in rc2a provided the administrators table with user/pw (and this table ONLY) is created and rc2a admin scripts are being used;

2. rc2a db can be used straightaway in osc2.2 unless osc admin scripts have been modified by contribs.

 

this is something easy DONE than SAY, by the time i type in all the possibilities and solution

for each possibility, i probably have solved the problem whatever it may be. A thorough knowledge and good experience of osc is the key.

 

Good Luck!

Ken

ps

it doesnt seem you are in the UK but i am in the UK it is now time for me to call it a day albeit a bit too late.

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

Ken, what do you think is wrong with my MS2.2 admin script where I can not login. The error is :

 

I am constantly getting the following errors whenever I try to go to the admin section of my site. The frontend works fine... Can any assist ASAP. I tried and tried with no luck. What is missing??

 

The error:

 

"Warning: require(includes/languages/.php) [function.require]: failed to open stream: No such file or directory in /home2/emcomp/public_html/admin/includes/application_top.php on line 130

"

 

ANY ASSISTANCE WILL BE APPRECIATED.

 

Thanks

 

I verified that I have english.php in the admin/includes/language folder and also a folder called english.

 

I did not change anything in the admin folder at all.

 

When I tried a given solution, by adding $language = "english.php" in the application_top.php script. When I added that line now when I type in xxx.com/admin it goes to the "weclome please sign in customer" screen.

 

This is what I added in the application_top.php in the admin/includes folder.

 

// set the language

$language='english';

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

}

 

The errors stopped as listed in the beginning of this post but it is now going to the Customer login in screen instead of the Admin screen.

 

My first preference would be to solve the original problem, however the work-around I discussed earlier is what a solution though.

 

Any ideas will be appreciated.

 

Searching the forums and web for several hours with no luck.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...