Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Warning: require(DIR_WS_FUNCTIONScompatibility.php) [function.require]: failed to open stream: No such file or directory


rongibson

Recommended Posts

Warning: require(DIR_WS_FUNCTIONScompatibility.php) [function.require]: failed to open stream: No such file or directory

 

Cannot find a solution to this error. Admin is fine, just on catalog. File 'compatibility.php' is there, in the 'functions' directory in the 'includes 'directory. It is properly listed in the configure.php, as shown in alll the examples online, no mis-spellings, correct spacing and puntuation.

 

Am I missing something?

 

I have checked if there was a configure file in 'local' aswell.

 

Error arose after hacking incident, that I had to reinstall from a site backup, to overwrite the existing directory.

 

I have installed Oscommerce in a new directory, without any issues. They have identical config files apart from the database details, and the new directory added to the paths.

 

Thanks for any ideas.

Link to comment
Share on other sites

Or the culprit may be the line

 

require(DIR_WS_FUNCTIONS . 'compatibility.php');

 

in

 

catalog/includes/application_top.php

 

It should include a full stop (which you may call a period) as shown. And the file-name needs to be in quotes.

Link to comment
Share on other sites

Thank you for your replies, I have looked at both the includes/config.php and the includes/application_top.php, until I go cross-eyed. I can not see anything wrong.

I have even copied and pasted the code to ensure the correct spacing and punctuation. Still the same error. As the code was recently upadted to php 5 for the host; is there anything else thyat could be wrong?

 

Application_top.php has line 40:

 

// some code to solve compatibility issues

require(DIR_WS_FUNCTIONS . 'compatibility.php');

 

Config.php has relevant lines 13, 14, 15:

.............

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

Link to comment
Share on other sites

Well, the interesting lines are

define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

 

Now, if you are still getting your original error message, that means either Config.php isn't being called for some reason (are you getting other errors?), or those lines are being excluded for some reason (any comments in the code you can't account for?). Remember that there are two configure.php files (those are the ones you're looking at, right?).

Link to comment
Share on other sites

  • 8 months later...

Im actually having this same problem, so did you find a solution for this?

 

Mine happened also after restoring a backup, i was trying to get an add-on but it went horribly wrong, so restored my store from the backup i made before trying to install the add on. After the restore i have been getting the same error message Warning: require(DIR_WS_FUNCTIONScompatibility.php): failed to open stream: No such file or directory in blabla, even they are there and they were working before the backup.

Link to comment
Share on other sites

It sounds like someone (or something) screwed it up royally while editing. The line should be

 

require(DIR_WS_FUNCTIONS . 'compatibility.php');

 

Did it somehow get changed to

require('DIR_WS_FUNCTIONScompatibility.php');

 

or, (more likely), DIR_WS_FUNCTIONS is no longer defined (the config file is unreadable or damaged).

Link to comment
Share on other sites

I solved this problem with my store. And i must point out that this problem appered only after i restored my backup, so the problem couldnt be in editing the files. So, i had made my backup from c-panel with the restore/backup wizard, and with that i tried to restore it and got this problem. But then i tried something else; i unzipped my backup package and uploaded the store folder by folder to my server with ftp and it works. So mine restore wizard was the problem, i cant tell why or how, but my store is up and runing again so what ever it was this was the way to work around it.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...