Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can't login to admin anymore


CoRRuPt

Recommended Posts

Hi,

 

Ok, I edited my includes/languages/english/index.php to change my main page text. Everything seemed to be working fine, but when I went to log back into my admin i get these errors now.

Warning: main(includes/languages/.php): failed to open stream: No such file or directory in /home/dragscom/public_html/estore/admin/includes/application_top.php on line 130

 

Warning: main(includes/languages/.php): failed to open stream: No such file or directory in /home/dragscom/public_html/estore/admin/includes/application_top.php on line 130

 

Fatal error: main(): Failed opening required 'includes/languages/.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dragscom/public_html/estore/admin/includes/application_top.php on line 130

 

The store itself seems to be functioning normally tho. Anyone have any ideas??

Link to comment
Share on other sites

do you have apostrophes ( ' ) in the text you just put in? If you do, "escape" them by putting a backslash ( \ ) in front of them.

 

 

FWIW, though, editing the language file for index.php shouldn't change your admin at all. Can you post line 130 from youra dmin/includes/application_top.php?

 

-jared

Link to comment
Share on other sites

Can you post line 130 from youra dmin/includes/application_top.php?

 

Line 130 reads

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

 

My store won't load anymore either!

 

it has the error

Warning: main(includes/languages/.php): failed to open stream: No such file or directory in /home/dragscom/public_html/estore/includes/application_top.php on line 285

 

Warning: main(includes/languages/.php): failed to open stream: No such file or directory in /home/dragscom/public_html/estore/includes/application_top.php on line 285

 

Fatal error: main(): Failed opening required 'includes/languages/.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dragscom/public_html/estore/includes/application_top.php on line 285

 

Line 285 in that page reads

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

 

Please help! Keep in mind I know nothing about php, I am trying to learn as I go.

Link to comment
Share on other sites

Please help! Keep in mind I know nothing about php, I am trying to learn as I go.

I know nothing of PHP either but that line seems to define where your language file can be found. A dot . signifies concatenation in this context (appending, glueing together.)

Both errors or related to the same file which can not be found.

Try to find out of it points to the right directory (probably defined in [/admin] /includes/configure.php )

 

Good luck

Can't think of a signature tight now. But just you wait till I read the next Discworld!

Link to comment
Share on other sites

Did you load the correct file to the correct location as this message is sometimes given if the wrong file is loaded or the file is in the wrong location.

 

Alternatively load a fresh copy of the file and see if this resolves the issue.

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Hi,

 

Shouldn't there be a language name in this line, like english.php?

 

Fatal error: main(): Failed opening required 'includes/languages/.php' (include_path='.:/usr/lib/php:/usr/local/lib/php')

 

In the includes/languages/ directory you should see at least the file english.php . The standard osCommerce installation also places the files espanol.php and german.php there. You could make a copy of a foreign language and name it english.php (BACKUP the original english.php FIRST!) and try again.

 

You can also replace the english/index.php with the original english/index.php. If this works, then you can search the index.php, modified by you, for errors.

 

Regards,

Edze

Link to comment
Share on other sites

I think your problem is the default language, this is probably not set, since you can't log on to your store or admin try this:

 

add a line to admin/includes/application_top.php:

$language = 'english' # (or whatever you prefer)

 

save and upload the file,

 

now you can probably see the interface again, in the interface go to languages and set your default language.

 

After that it should all work again and you can remove the '$language' line you just added.

 

Frank.

Link to comment
Share on other sites

Did you load the correct file to the correct location as this message is sometimes given if the wrong file is loaded or the file is in the wrong location.

 

Alternatively load a fresh copy of the file and see if this resolves the issue.

 

 

speaking of deafult language ..in which database is stored info on which language is default?

 

can't find it .. cause my language is set to default .. but not shown ...

 

thenx

Link to comment
Share on other sites

I think your problem is the default language, this is probably not set, since you can't log on to your store or admin try this:

 

add a line to admin/includes/application_top.php:

$language = 'english'  # (or whatever you prefer)

 

save and upload the file,

 

now you can probably see the interface again, in the interface go to languages and set your default language.

 

After that it should all work again and you can remove the '$language' line you just added.

 

Frank.

It sounds right - that it has something to do with default language not selected, but i get the following erroer when I try to do what you say.->

Parse error: parse error in /home/virtual/svedigt-kluns.dk/public_html/catalog/admin/includes/application_top.php on line 126

 

Fatal error: Call to undefined function: tep_href_link() in /home/virtual/svedigt-kluns.dk/public_html/catalog/admin/index.php on line 17

 

Where should it be placed in the .php file?

 

Thanks

Dedicated OsCommerce user. 2011 will be the return of OsC

Link to comment
Share on other sites

  • 7 months later...

This error just happened while one of my co-workers was doing product maintenace. Both my ADMIN and CATALOG sections were screwed up. This co-worker does not have access to see the "language" link under the Admin, so I know she could not have changed the default language.

 

To resolve, I needed to find these lines in both /catalog/admin/application_top.php & /catalog/inclues/application_top.php:

 

$language = $lng->language['directory'];

$languages_id = $lng->language['id'];

 

And the these 2 lines after:

 

$language = 'english';

$languages_id = 1;

 

 

Now here's the weird thing - once I was able to get into the LANGUAGES section of the Admin, English was still set as default. :blink:

 

The Million Dollar Question: HOW/WHY DID THIS HAPPEN? I'm assuming some kind of transaction corrupted the database to cause this - so can I prevent it from happening again? Any thoughts?

 

Sam

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...