Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

No such file or directory errors


cma01

Recommended Posts

Hi,

 

I installed 2.2 MS2 yesterday and it seemed to install correctly. I did some changes to the stylesheet, added some information, everything was still working when I stopped last night.

 

Today when I went to the new shop to do more changes, I go this error message:

 

Warning: main(includes/languages/.php): failed to open stream: No such file or directory in C:websitesmysitewwwcatalogincludesapplication_top.php on line 285

 

Fatal error: main(): Failed opening required 'includes/languages/.php' (include_path='.;c:php4pear') in C:websitesmysitewwwcatalogincludesapplication_top.php on line 285

 

Here is the referenced line in application_top.php

// include the language translations

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

 

Some backstory: I originally had a shop with an older version of oscommerce set up for me by a different host. They weren't very responsive when I had questions, so I switched to a different host. I did ask them ahead of time if they supported osCommerce, and they said "No Problem."

 

Well, there were problems, but after messing around for a couple of weeks trying to figure out what was wrong, I decided just to wait for the new release and do a clean install. My old, semi-functional site is still up under a /shop folder and I can access it.

 

The problem in a nutshell is my new install was working last night, today it's not. All I can think of is that the host must have changed some setting that caused the problem.

 

Carla

Link to comment
Share on other sites

Warning: main(includes/languages/.php): failed to open stream: No such file or directory in C:websitesmysitewwwcatalogincludesapplication_top.php on line 285

 

Fatal error: main(): Failed opening required 'includes/languages/.php' (include_path='.;c:php4pear') in C:websitesmysitewwwcatalogincludesapplication_top.php on line 285

 

 

The $language is not being set properly by osC (if you try your request with ?lang=nl, or 〈=nl if there already another paramter passed, added in the URL bar it will work)

The 4th line should read for example:

 

Fatal error: main(): Failed opening required 'includes/languages/english.php'

 

You could try to restore include/classes/language.php with the original from the distibution to make sure this hasn't file been altered.

 

 

HTH,

Rob

Link to comment
Share on other sites

Nope, that didn't work.

 

I just deleted and reinstalled the new shop and I still get the same error.

 

I emailed my host and was told to check to see if the referenced file is there, which it is.

 

So, I'm still stuck.

 

Carla

Link to comment
Share on other sites

I emailed my host and was told to check to see if the referenced file is there, which it is.  

Which file are you referring to, your original post showed

 

Failed opening required 'includes/languages/.php'  

Which is obviously wrong.

I take it the error output is still the same?

 

Should there be a definition for language.php in includes/filename.php?

No, application_top includes it on line 23 if all is correct.

 

Are you sure language.php is getting pulled in in application_top.php?

 

Rob

Link to comment
Share on other sites

Did you try '/catalog/index.php?language=en'?

 

If this does not work I'm pretty sure languages.php does not get imported properly.

 

HTH,

Rob

Link to comment
Share on other sites

This probably seems like a really fundamental question, but have you checked your Language settings in Admin - Localization?

I ask because I can reproduce exactly your error by editting, for example, 'English' (which is set as my Default language) and removing the Directory: setting.

Regards, Wizzud

"It is better to remain silent and be thought a fool, than to open your mouth and remove all doubt."

Link to comment
Share on other sites

Wizzud,

 

I can't check the setting in Admin because I get an error message before I reach anything.

 

I deleted the new install on my host, as well as on my computer. I unzipped the files again to my computer and FTP'd them to my host. Went through the configuration screens. The installation was successful.

 

After all this, I still get the same error message that I included in the first post. It wouldn't load either the catalog or the admin page. (Keep in mind that it worked the first time I installed it).

 

The host said that they have not made any changes at all to the server. So as of right now, I completely deleted the new install again, sent them the oscommerce .tar and a link to the install page, and they are going to install it for me. So we'll see if it works for them.

 

Rob,

 

I have no idea if the language file was being included in application_top. I made sure that the file was from the original download as well as completely reinstalling it.

 

Carla

Link to comment
Share on other sites

... sent them the oscommerce .tar and a link to the install page, and they are going to install it for me.  So we'll see if it works for them.

OK,

Good luck with it.

If they can't get it to work, maybe you can post an URL so someone can have a look.

 

I have no idea if the language file was being included in application_top.  I made sure that the file was from the original download as well as completely reinstalling it.

In that case it should be ok, I thought maybe you had customised your osC.

 

Rob

Link to comment
Share on other sites

hi,

 

i have exactly the same problem; from the beginning. everything seemed to be installed correctly, but when i try to open catalog or admin i get those warnings and can t get any further.

 

is there a solution already?

 

would be very happy if anyone could give me some help!

 

thanks

jack

 

(this is my first posting; i hope my english improves with the following postings :wink: )

Link to comment
Share on other sites

I have the same problem. I suspect it has something to do with my host because i installed successfully to another host.

 

Here's something i noticed:

on the bad server the install procedure created 26 tables, only 3 have data (configuration is blank).

 

on the good one: 43 tables, and most of those have data.

 

I then replaced the tables in the bad server and it worked!

 

I suspect if u do a manual install it will work...

Link to comment
Share on other sites

I spoke too soon.

 

When i refresh the page, i get a blank page that looks like it is still running- i look at the page properties and find the url is:

url/catalog/index.php#url/catalog/index.php

Link to comment
Share on other sites

the problem is sort of a time out problem (i guess). i deleted everything (files on the server and database) and installed everything again and - suddenly everything worked perfect. i didn t do a single thing different. the only thing i noticed: the installation, which didn t work took very long, the installation that worked, not. and in the first case i had a lot of empty database tables, in the second one most were full.

 

maybe a hint...

jack

Link to comment
Share on other sites

  • 1 year later...

why is there a referrence to C:\websites when the application is sitting on your hosting service.

 

Where are you calling the file from your harddrive or from your hosting service.

 

Can you see the database is it accessible to you.

 

I am curious if this is a first time default install on your localhost being your

internet provider ... why is there a C: in the error message?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...