Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shopping Cart Page Error


HemantBhatt

Recommended Posts

Hi...

On shopping Cart Page shown a these error..how can i solve this error..

 

 

Warning: payment::include(includes/languages/english/modules/payment/cc.php) [function.payment-include]: failed to open stream: No such file or directory in /home/content/s/u/h/suhasarora/html/greycoconut/oscommerce/catalog/includes/classes/payment.php on line 38

 

Warning: payment::include() [function.include]: Failed opening 'includes/languages/english/modules/payment/cc.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/s/u/h/suhasarora/html/greycoconut/oscommerce/catalog/includes/classes/payment.php on line 38

 

Warning: payment::include(includes/languages/english/modules/payment/cod.php) [function.payment-include]: failed to open stream: No such file or directory in /home/content/s/u/h/suhasarora/html/greycoconut/oscommerce/catalog/includes/classes/payment.php on line 38

 

Warning: payment::include() [function.include]: Failed opening 'includes/languages/english/modules/payment/cod.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/s/u/h/suhasarora/html/greycoconut/oscommerce/catalog/includes/classes/payment.php on line 38

Link to comment
Share on other sites

  • 1 month later...

From the first error message, it appears that you are in directory catalog/includes/classes/, running payment.php at line 38. There, it wants to include the file includes/languages/english/modules/payment/cc.php. The problem is, it will be looking in catalog/includes/classes/includes/languages/english/modules/payment for the file. I suspect that you want to go up one level (..) to catalog/includes/ and then down to languages/english/modules/payment/... (looking in catalog/includes/languages/english/modules/payment/, where there is a cc.php file).

 

The code is

		  include(DIR_WS_LANGUAGES . $language . '/modules/payment/' . $include_modules[$i]['file']);

where $language = 'english' and the $include_modules element is 'cc.php'. What is your DIR_WS_LANGUAGES defined to be in

catalog/includes/configure.php? The default is includes/languages/. Now, the $64,000 question is, "why doesn't this happen to everyone?"

 

The next line is

		  include(DIR_WS_MODULES . 'payment/' . $include_modules[$i]['file']);

where I suspect the same problem is going to occur -- you're looking in a relative path from wherever you are now, and you're not in the right place to do that.

 

A possible solution is in configure.php to change the define for DIR_WS_INCLUDES from just includes/ to the full PHP path,

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

Don't forget to move the define for DIR_FS_CATALOG ahead of the define for DIR_WS_INCLUDES.

 

I don't understand why osC is using DIR_WS_x for PHP includes. That is supposed to be used only for HTML paths (relative or absolute to the root of your site, not the filesystem root). Perhaps before you change anything, some developer could explain

1) why PHP includes are using DIR_WS_INCLUDES rather than a (new) DIR_FS_INCLUDES

2) why not everyone experiences this odd behavior with overlapping paths (catalog/includes/classes/includes/...).

 

Another (and simpler) solution might be to add to your PHP include_path to start looking for the .../catalog directory. This is usually done in a "php.ini" file, although for some backlevel PHPs it might be done in .htaccess.

 

I've seen this question asked a number of times, so it would be good to get it settled with a common fix.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...