Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

ERROR language .php URGENT


innovcom

Recommended Posts

Posted

Our server was updated. php.ini, permissions and sessions have changed.

 

All of the bugs are worked out except one.

 

I now get the following error:

 

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

 

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

 

line 285 is as follows:

 

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

 

I've read somewhere else to change this to my desired language - english.php

 

This does not work.

 

Also, the default language is selected in admin.

 

Please help. I have multiple unfunctioning OSCommerce installations right now. I've been tapdancing in a minefield all day.

 

Your help is greatly appreciated.

Posted

It's either an error in your configure.php files, or else the permissions on the includes folder are not set to allow access to read files inside it (755).

 

Vger

Posted
It's either an error in your configure.php files, or else the permissions on the includes folder are not set to allow access to read files inside it (755).

 

Vger

 

Permissions are set to 755.

 

Here's my configure.php. I see no errors:

 

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://mysite.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://mysite.com'); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', true); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'mysite.com');

define('HTTPS_COOKIE_DOMAIN', 'mysite.com');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

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', '/home2/mysite/public_html/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be NULL for productive servers

define('DB_SERVER_USERNAME', 'mysite_osc1');

define('DB_SERVER_PASSWORD', 'mycodeblahblahblah');

define('DB_DATABASE', 'mysite_osc1');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

 

// STS: ADD: Define Simple Template System files

define('STS_START_CAPTURE', DIR_WS_INCLUDES . 'sts_start_capture.php');

define('STS_STOP_CAPTURE', DIR_WS_INCLUDES . 'sts_stop_capture.php');

define('STS_RESTART_CAPTURE', DIR_WS_INCLUDES . 'sts_restart_capture.php');

define('STS_TEMPLATE_DIR', DIR_WS_INCLUDES . 'sts_templates/');

define('STS_DEFAULT_TEMPLATE', DIR_WS_INCLUDES . 'sts_template.html');

define('STS_DISPLAY_OUTPUT', DIR_WS_INCLUDES . 'sts_display_output.php');

define('STS_USER_CODE', DIR_WS_INCLUDES . 'sts_user_code.php');

define('STS_PRODUCT_INFO', DIR_WS_INCLUDES . 'sts_product_info.php');

// STS: EOADD

?>

Posted
do you have an english.php file in the directory?

 

 

Why is it requesting the following:?

 

Warning: main(includes/languages/.php): failed to open stream: No such file or directory

 

It is not asking for english.php but instead just .php

Posted
In which case I guess it's down to an incomplete install of STS.

 

Vger

 

Negative.

 

I'm getting the same error in a store that does not utilize STS.

 

This is weird.

Posted

are you using use search engine friendly urls true if yes then try switching this off

 

Is register_globals on in the php.ini file?

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.

Posted
are you using use search engine friendly urls true if yes then try switching this off

 

Is register_globals on in the php.ini file?

 

SEO urls is off.

 

register_globals is on in php.ini

Posted

The issue is caused by the addition of phpsuexec and is normally a case of configuration as phpsuexec only grants the owner permissions.

 

It uses the full CHMOD 0755 instead of the abbreviated form of 755

 

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

 

changed to

 

require(DIR_WS_LANGUAGES . 'english.php');

 

will work however you then would need to go the full distance with each file.

 

for example index.php

 

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);

 

changes to

 

  require(DIR_WS_LANGUAGES . 'english/' . FILENAME_DEFAULT);

 

 

The other thing to be looked at is the .htaccess files as some of the configuration will need to be adjusted or moved to compensate for phpsuexec.

 

If you contact your host they should be able to resolve this for you.

 

Try this temp rename the .htaccess file in your catalog/includes folder.

Make sure things are backed up first.

 

If this clears the error then it is a configuration for access 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.

Posted
The issue is caused by the addition of phpsuexec and is normally a case of configuration as phpsuexec only grants the owner permissions.

 

It uses the full CHMOD 0755 instead of the abbreviated form of 755

 

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

 

changed to

 

require(DIR_WS_LANGUAGES . 'english.php');

 

will work however you then would need to go the full distance with each file.

 

for example index.php

 

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);

 

changes to

 

  require(DIR_WS_LANGUAGES . 'english/' . FILENAME_DEFAULT);

The other thing to be looked at is the .htaccess files as some of the configuration will need to be adjusted or moved to compensate for phpsuexec.

 

If you contact your host they should be able to resolve this for you.

 

Try this temp rename the .htaccess file in your catalog/includes folder.

Make sure things are backed up first.

 

If this clears the error then it is a configuration for access issue

 

I've gotten most of this cleared up. The only weird thing is that the buy now buttons, etc. are not visible. Here's what the image link looks like:

 

http://mydomain.com/includes/languages//im...ton_buy_now.gif

 

Why is it adding in an extra forward slash on the images file?

Posted

The extra slash in the the url is normally associated with a wrong path in the configuration.

 

You do not state if you used any of the previous suggestions but you do quote the post, therefore I have no way of knowing if you tried any of the previous suggestion or indeed what you have tried or done to partially resolve the issue.

 

Without knowing what you have done to gain a partial work I could not give a further step to try.

 

The posting of the quote would suggest that you tried something from that quote, however it does not allow anyone reading the thread to know if anything from that quote was of any use.

 

The link provided would suggest that there is a missing language in your case english.

 

If you look at the code in includes/functions/html_output.php you will see the references to $language this would require to be changed to english

 

However these are only really workarounds as $language is a global along with others and it would suggest that the permissions issue is what is stopping these globals from being set.

 

You may find that once the issue of language is resolved that you have further issues with other globals such as currency.

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.

Posted

I've found the solution.

 

The fix is actually very simple. If you've applied mods to your code in an effort to fix the phpsuexec problem, undo them. Phpsuexec was recently initiated on my server. That's what caused it.

 

As I said, undo anything you may have done. Then, the solution is simple. Rename the .htaccess file in your catalog/includes folder to php.ini. If you have "Use Search Engine Friendly URLs" selected in the configuration section of the backend, deselect it. That's it.

Archived

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

×
×
  • Create New...