Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Link in the Checkout button results in a 404


techpronow

Recommended Posts

At the shopping_cart.php, when I click the "Checkout" button, it gives me a 404 error.

 

The reason is that there is a / missing in the URL.

 

Instead of going to http://mydomain/osC/checkout_shipping.php

It goes to: http://mydomain/osCcheckout_shipping.php

 

 

I've searched the forums for an hour, and I found 1 guy that said he found resolution to this in the KB. So I searched the KB for about another 30 minutes with no resolve.

 

Can someone tell me how to add the missing forward slash / ?

 

Thanks in advance!

Link to comment
Share on other sites

Sounds to me like the error is within your configure.php file which is located in the includes folder.

 

 

I used dreamweaver to search for the referenced file where the link is broken, and I've sifted through about 100 files.

Included in those is configure.php

 

 

This is what I have in configure.php (domain name changed for security reasons)

 

 

 

 if (! $file = @fopen("../../mainfile.php","r") ) {
if( ! $file = @fopen("mainfile.php","r"))  die("Error");
 }
 while (!feof($file)) {
 $l="";
 $tt="";
 $buffer = trim(fgets($file, 4096));
 $l=strtoupper($buffer);
 if (substr($l,0,6) == "DEFINE") {
$l=substr($buffer,8);
$l=substr($l,0,-2);
$l=str_replace("'","",$l);
$l=str_replace("\"","",$l);
$l=explode(",",$l);
switch ($l[0]) {
  case "XOOPS_URL":
	$l[1]=ereg_replace(" ","",$l[1]);
	define("OSC_URL",$l[1]);
	break;
  case "XOOPS_ROOT_PATH":
		$l[1]=ereg_replace(" ","",$l[1]);
	define("OSC_ROOT_PATH",$l[1]);
	break;
  }  
}
}
fclose($file);



define('HTTP_SERVER',OSC_URL.'/modules/osC/'); // eg, http://localhost - should not be empty for productive servers
define('HTTPS_SERVER', 'https://mydomain.com/modules/osC'); // eg, https://localhost - should not be empty for productive servers
define('ENABLE_SSL', false); // secure webserver for checkout procedure?
define('HTTP_COOKIE_DOMAIN', '');
define('HTTPS_COOKIE_DOMAIN', '');
define('HTTP_COOKIE_PATH', '');
define('HTTPS_COOKIE_PATH', '');
define('DIR_WS_HTTP_CATALOG','');
define('DIR_WS_HTTPS_CATALOG', '');
define('DIR_WS_IMAGES', HTTP_SERVER.'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',OSC_ROOT_PATH."/modules/osC/");  //dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
?>

Link to comment
Share on other sites

Where it says

define('HTTPS_SERVER', 'https://mydomain.com/modules/osC');

Replace with

define('HTTPS_SERVER', 'https://mydomain.com/modules/osC/');

Link to comment
Share on other sites

Where it says

define('HTTPS_SERVER', 'https://mydomain.com/modules/osC');

Replace with

define('HTTPS_SERVER', 'https://mydomain.com/modules/osC/');

 

 

Cool, Im giving it a try now. But notice that I have SSL turned off. I figured that the https address wouldn't matter.

 

I'll let you know. Thanks again.

Link to comment
Share on other sites

Cool, Im giving it a try now. But notice that I have SSL turned off. I figured that the https address wouldn't matter.

 

I'll let you know. Thanks again.

 

 

It worked! =) Thanks!

 

I don't know why the https issue would be an issue. But, it was. =)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...