Forums / Managing Customers and Orders / "Go to Checkout" gives 404 Page Not Found Error

"Go to Checkout" gives 404 Page Not Found Error

Locked

Views: 4,239

Results 1 to 17 of 17
This thread is locked. New replies are disabled.
3 Jul 2010, 5:02 AM
#1
mehyourface avatar

mehyourface

New Zenner

Join Date:
Mar 2010
Posts:
23
Plugin Contributions:
0

"Go to Checkout" gives 404 Page Not Found Error

I've been searching the forums for help w/ this issue but I can't seem to find anything.

Clicking on the "Go To Checkout" button gives me a 404 Page Not Found Error.

I stopped working on my website for a couple of months after a car accident and think the error may have occurred then. Unfortunately, I've since forgotten what was added/changed.

Please help! :smile: It will be GREATLY appreciated!

website: www.kidsteamspirit.com/store
Zen Cart version 1.3.8.a
Mods used: Checkout Amazon Style, Flexible Product Listing (Column Layout Grid included), Zen Lightbox, Image Handler 2, Hide Show Phone on Sign Up, Product Info Extra Images LH Side, & SWF Object

3 Jul 2010, 4:03 PM
#2
mehyourface avatar

mehyourface

New Zenner

Join Date:
Mar 2010
Posts:
23
Plugin Contributions:
0

Re: "Go to Checkout" gives 404 Page Not Found Error

Bump...

Please help! I've no clue where the problem lies!

3 Jul 2010, 9:32 PM
#3
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: "Go to Checkout" gives 404 Page Not Found Error

Install the utility mentioned here and post the error log findings.

https://www.zen-cart.com/tutorials/index.php?article=82

3 Jul 2010, 10:00 PM
#4
mehyourface avatar

mehyourface

New Zenner

Join Date:
Mar 2010
Posts:
23
Plugin Contributions:
0

Re: "Go to Checkout" gives 404 Page Not Found Error

stevesh:

Install the utility mentioned here and post the error log findings.

https://www.zen-cart.com/tutorials/index.php?article=82

Hi Stevesh:
I added the "enable_error_logging.php" file into my includes/extra_configures folder but no new "myDebug" error file showed up in the cache.

I'm able to create a test user account and see the "add to cart" page, just no checkout page. :dontgetit

3 Jul 2010, 10:14 PM
#5
mehyourface avatar

mehyourface

New Zenner

Join Date:
Mar 2010
Posts:
23
Plugin Contributions:
0

Re: "Go to Checkout" gives 404 Page Not Found Error

I removed the Debug Error-Logging file and followed the instructions under "b) Attempt to show errors on screen". This was successful in showing me the warning error: "Cannot send session cookie - headers already sent ...on line 108"

Now I'm following the tutorial on Headers Already Sent to see if that will fix it.

Will update soon... :book:

3 Jul 2010, 10:34 PM
#6
mehyourface avatar

mehyourface

New Zenner

Join Date:
Mar 2010
Posts:
23
Plugin Contributions:
0

Re: "Go to Checkout" gives 404 Page Not Found Error

The error is in the includes/functions/sessions.php file on line 108. Unfortunately, I don't know enough about PHP to know what should be changed...

Here is the source code from lines 102 - 114:

function zen_session_start() {
    @ini_set('session.gc_probability', 1);
    @ini_set('session.gc_divisor', 2);
    if (defined('DIR_WS_ADMIN')) {
      @ini_set('session.gc_maxlifetime', (SESSION_TIMEOUT_ADMIN < 900 ? (SESSION_TIMEOUT_ADMIN + 900) : SESSION_TIMEOUT_ADMIN));
    }
    $temp = session_start();
    if (!isset($_SESSION['securityToken'])) {
      $_SESSION['securityToken'] = md5(uniqid(rand(), true));
    }
  	if (ereg_replace('[a-zA-Z0-9]', '', session_id()) != '') session_regenerate_id();
    return $temp;
  }

In the file, "$temp = session_start();" is line 108. Any ideas on what might should be done??? I've never modified this file before.

Thank you in advance!

3 Jul 2010, 11:00 PM
#7
mehyourface avatar

mehyourface

New Zenner

Join Date:
Mar 2010
Posts:
23
Plugin Contributions:
0

Re: "Go to Checkout" gives 404 Page Not Found Error

Found the source of the problem...

Warning: Cannot modify header information - headers already sent by (output started at /home//public_html/store/includes/init_includes/init_sessions.php:89) in /home//public_html/store/includes/init_includes/init_templates.php on line 78

According to the error message on the page, the problem starts in include/init_includes/init_sessions.php:90. I understand I'm to ignore the error in init_templates.php because that's what discovered the problem. Unfortunately, I don't notice any blank spaces, white space, or odd-ball characters in the PHP in the init_sessions.php file. (Probably because I'm such a newbie.)

Any ideas??

<?php
/**
 * session handling
 * see {@link  http://www.zen-cart.com/wiki/index.php/Developers_API_Tutorials#InitSystem wikitutorials} for more details.
 *
 * @package initSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: init_sessions.php 5164 2006-12-10 19:01:25Z drbyte $
 */
if (!defined('IS_ADMIN_FLAG')) {
  die('Illegal Access');
}
/**
 * require the session handling functions
 */
require(DIR_WS_FUNCTIONS . 'sessions.php');
/**
 * set the session name and save path
 */
zen_session_name('zenid');
zen_session_save_path(SESSION_WRITE_DIRECTORY);
/**
 * set the session cookie parameters
 */
session_set_cookie_params(0, '/', (zen_not_null($current_domain) ? $current_domain : ''));
/**
 * set the session ID if it exists
 */
if (isset($_POST[zen_session_name()])) {
  zen_session_id($_POST[zen_session_name()]);
} elseif ( ($request_type == 'SSL') && isset($_GET[zen_session_name()]) ) {
  zen_session_id($_GET[zen_session_name()]);
}
/**
 * need to tidy up $_SERVER['REMOTE_ADDR'] here beofre we use it any where else
 * one problem we don't address here is if $_SERVER['REMOTE_ADDRESS'] is not set to anything at all
 */
$ipAddressArray = explode(',', $_SERVER['REMOTE_ADDR']);
$ipAddress = (sizeof($ipAddressArray) > 0) ? $ipAddressArray[0] : '';
$_SERVER['REMOTE_ADDR'] = $ipAddress;
/**
 * start the session
 */
$session_started = false;
if (SESSION_FORCE_COOKIE_USE == 'True') {
  zen_setcookie('cookie_test', 'please_accept_for_session', time()+60*60*24*30, '/', (zen_not_null($current_domain) ? $current_domain : ''));
if (isset($_COOKIE['cookie_test'])) {
    zen_session_start();
    $session_started = true;
  }
} elseif (SESSION_BLOCK_SPIDERS == 'True') {
  $user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
  $spider_flag = false;
  if (zen_not_null($user_agent)) {
    $spiders = file(DIR_WS_INCLUDES . 'spiders.txt');
    for ($i=0, $n=sizeof($spiders); $i<$n; $i++) {
      if (zen_not_null($spiders[$i])) {
        if (is_integer(strpos($user_agent, trim($spiders[$i])))) {
          $spider_flag = true;
          break;
        }
      }
    }
  }
  if ($spider_flag == false) {
    zen_session_start();
    $session_started = true;
  }
} else {
  zen_session_start();
  $session_started = true;
}
/**
 * set host_address once per session to reduce load on server
 */
if (!isset($_SESSION['customers_host_address'])) {
  if (SESSION_IP_TO_HOST_ADDRESS == 'true') {
    $_SESSION['customers_host_address']= @gethostbyaddr($_SERVER['REMOTE_ADDR']);
  } else {
    $_SESSION['customers_host_address'] = OFFICE_IP_TO_HOST_ADDRESS;
  }
}
/**
 * verify the ssl_session_id if the feature is enabled
 */
if ( ($request_type == 'SSL') && (SESSION_CHECK_SSL_SESSION_ID == 'True') && (ENABLE_SSL == 'true') && ($session_started == true) ) {
  $ssl_session_id = $_SERVER['SSL_SESSION_ID'];
  if (!$_SESSION['SSL_SESSION_ID']) {
    $_SESSION['SSL_SESSION_ID'] = $ssl_session_id;
  }
  if ($_SESSION['SSL_SESSION_ID'] != $ssl_session_id) {
    zen_session_destroy();
    zen_redirect(zen_href_link(FILENAME_SSL_CHECK));
  }
}
/**
 * verify the browser user agent if the feature is enabled
 */
if (SESSION_CHECK_USER_AGENT == 'True') {
  $http_user_agent = $_SERVER['HTTP_USER_AGENT'];
  if (!$_SESSION['SESSION_USER_AGENT']) {
    $_SESSION['SESSION_USER_AGENT'] = $http_user_agent;
  }
  if ($_SESSION['SESSION_USER_AGENT'] != $http_user_agent) {
    zen_session_destroy();
    zen_redirect(zen_href_link(FILENAME_LOGIN));
  }
}
/**
 * verify the IP address if the feature is enabled
 */
if (SESSION_CHECK_IP_ADDRESS == 'True') {
  $ip_address = zen_get_ip_address();
  if (!$_SESSION['SESSION_IP_ADDRESS']) {
    $_SESSION['SESSION_IP_ADDRESS'] = $ip_address;
  }
  if ($_SESSION['SESSION_IP_ADDRESS'] != $ip_address) {
    zen_session_destroy();
    zen_redirect(zen_href_link(FILENAME_LOGIN));
  }
}
?>
4 Jul 2010, 3:06 AM
#8
mehyourface avatar

mehyourface

New Zenner

Join Date:
Mar 2010
Posts:
23
Plugin Contributions:
0

Re: "Go to Checkout" gives 404 Page Not Found Error

Anyone have any input on the above code? There are no blank spaces before or after the PHP open and close tags.

Also, line 89 specified is: "$ssl_session_id = $_SERVER['SSL_SESSION_ID'];" under the "verify the ssl_session_id if the feature is enabled"

I'm at a total loss...
:frusty:

4 Jul 2010, 6:16 AM
#9
mehyourface avatar

mehyourface

New Zenner

Join Date:
Mar 2010
Posts:
23
Plugin Contributions:
0

Re: "Go to Checkout" gives 404 Page Not Found Error

I've updated to Zen Cart v1.3.9d thinking this would help the error go away...

No such luck. I'm still receiving the Page Not Found error.

:frusty: :censored: :cry:

4 Jul 2010, 7:21 AM
#10
mehyourface avatar

mehyourface

New Zenner

Join Date:
Mar 2010
Posts:
23
Plugin Contributions:
0

Re: "Go to Checkout" gives 404 Page Not Found Error

I'm so thoroughly frustrated and disgusted w/ this error... :censored:

Since updating to Zen Cart v1.3.9d, I can no longer see any errors from the Strict Error Reporting Log and the Debug Mod never pulled anything up for me. (Yes the files are in the correct spots... /includes/local/configure.php & includes/extra_configures/enable_error_logging.php) I even checked the error logs on my host's server and it came up clean and yet I'm still receiving the 404 Error.

I've been working on this all night and day and have yet to find anything that will help me solve this on my own. I haven't found any posts that can specifically say what solved their issue besides deleting white spaces in their PHP files, which I've done.

Please, if anyone can offer assistance, I would be most graciously appreciative. This is now holding up my dreams of owning my own business. I'm willing to beg for help. Beg... beg... beg...

5 Jul 2010, 3:58 PM
#11
mehyourface avatar

mehyourface

New Zenner

Join Date:
Mar 2010
Posts:
23
Plugin Contributions:
0

Re: "Go to Checkout" gives 404 Page Not Found Error

Anyone?????

5 Jul 2010, 11:03 PM
#12
mehyourface avatar

mehyourface

New Zenner

Join Date:
Mar 2010
Posts:
23
Plugin Contributions:
0

Re: "Go to Checkout" gives 404 Page Not Found Error

I updated to Zen Cart v1.3.9d and the error is still pointing to init_sessions.php now on line 42. Unfortunately, I see nothing wrong... no blank spaces and I've deleted the extra lines between coding & that didn't work. (Restored by using back-up files to original 1.3.9d init_sessions.php file.)

Can anyone see where the culprit is?
Many many many thanks in advance.

PS: For reference: Line 42 is "session_set_cookie_params(0, $path, (zen_not_null($cookiedomain) ? '.' . $cookiedomain : ''));"

<?php
ini_set('display_errors',1);
error_reporting(E_ALL);
?>
<?php
/**
 * session handling
 * see {@link  http://www.zen-cart.com/wiki/index.php/Developers_API_Tutorials#InitSystem wikitutorials} for more details.
 *
 * @package initSystem
 * @copyright Copyright 2003-2010 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: init_sessions.php 16258 2010-05-11 09:52:08Z wilt $
 */
if (!defined('IS_ADMIN_FLAG')) {
  die('Illegal Access');
}
/**
 * sanity check in case zenid has been incorrectly supplied as an htmlencoded param name
 */
if (!isset($_GET['zenid']) && isset($_GET['amp;zenid'])) {
  $_GET['zenid'] = $_GET['amp;zenid'];
  unset($_GET['amp;zenid']);
}

/**
 * require the session handling functions
 */
require(DIR_WS_FUNCTIONS . 'sessions.php');
/**
 * set the session name and save path
 */
zen_session_name('zenid');
zen_session_save_path(SESSION_WRITE_DIRECTORY);
/**
 * set the session cookie parameters
 */
$path = str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME']));
$path = (defined('CUSTOM_COOKIE_PATH')) ? CUSTOM_COOKIE_PATH : $path;

session_set_cookie_params(0, $path, (zen_not_null($cookiedomain) ? '.' . $cookiedomain : ''));
/**
 * set the session ID if it exists
 */
if (isset($_POST[zen_session_name()])) {
  zen_session_id($_POST[zen_session_name()]);
} elseif ( ($request_type == 'SSL') && isset($_GET[zen_session_name()]) ) {
  zen_session_id($_GET[zen_session_name()]);
}
/**
 * need to tidy up $_SERVER['REMOTE_ADDR'] here beofre we use it any where else
 * one problem we don't address here is if $_SERVER['REMOTE_ADDRESS'] is not set to anything at all
 */
$ipAddressArray = explode(',', $_SERVER['REMOTE_ADDR']);
$ipAddress = (sizeof($ipAddressArray) > 0) ? $ipAddressArray[0] : '';
$_SERVER['REMOTE_ADDR'] = $ipAddress;
/**
 * start the session
 */
$session_started = false;
if (SESSION_FORCE_COOKIE_USE == 'True') {
  zen_setcookie('cookie_test', 'please_accept_for_session', time()+60*60*24*30, '/', (zen_not_null($current_domain) ? $current_domain : ''));

  if (isset($_COOKIE['cookie_test'])) {
    zen_session_start();
    $session_started = true;
  }
} elseif (SESSION_BLOCK_SPIDERS == 'True') {
  $user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
  $spider_flag = false;
  if (zen_not_null($user_agent)) {
    $spiders = file(DIR_WS_INCLUDES . 'spiders.txt');
    for ($i=0, $n=sizeof($spiders); $i<$n; $i++) {
      if (zen_not_null($spiders[$i]) && substr($spiders[$i], 0, 4) != '$Id:') {
        if (is_integer(strpos($user_agent, trim($spiders[$i])))) {
          $spider_flag = true;
          break;
        }
      }
    }
  }
  if ($spider_flag == false) {
    zen_session_start();
    $session_started = true;
  } else {
    if (isset($_GET['zenid']) && $_GET['zenid'] != '') {
      $tmp = (isset($_GET['main_page']) && $_GET['main_page'] != '') ? $_GET['main_page'] : FILENAME_DEFAULT;
      @header("HTTP/1.1 301 Moved Permanently");
      @zen_redirect(@zen_href_link($tmp, @zen_get_all_get_params(array('zenid')), $request_type, FALSE));
      unset($tmp);
      die();
    }
  }
} else {
  zen_session_start();
  $session_started = true;
}
unset($spiders);
/**
 * set host_address once per session to reduce load on server
 */
if (!isset($_SESSION['customers_host_address'])) {
  if (SESSION_IP_TO_HOST_ADDRESS == 'true') {
    $_SESSION['customers_host_address']= @gethostbyaddr($_SERVER['REMOTE_ADDR']);
  } else {
    $_SESSION['customers_host_address'] = OFFICE_IP_TO_HOST_ADDRESS;
  }
}
/**
 * verify the ssl_session_id if the feature is enabled
 */
if ( ($request_type == 'SSL') && (SESSION_CHECK_SSL_SESSION_ID == 'True') && (ENABLE_SSL == 'true') && ($session_started == true) ) {
  $ssl_session_id = $_SERVER['SSL_SESSION_ID'];
  if (!$_SESSION['SSL_SESSION_ID']) {
    $_SESSION['SSL_SESSION_ID'] = $ssl_session_id;
  }
  if ($_SESSION['SSL_SESSION_ID'] != $ssl_session_id) {
    zen_session_destroy();
    zen_redirect(zen_href_link(FILENAME_SSL_CHECK));
  }
}
/**
 * verify the browser user agent if the feature is enabled
 */
if (SESSION_CHECK_USER_AGENT == 'True') {
  $http_user_agent = $_SERVER['HTTP_USER_AGENT'];
  if (!$_SESSION['SESSION_USER_AGENT']) {
    $_SESSION['SESSION_USER_AGENT'] = $http_user_agent;
  }
  if ($_SESSION['SESSION_USER_AGENT'] != $http_user_agent) {
    zen_session_destroy();
    zen_redirect(zen_href_link(FILENAME_LOGIN));
  }
}
/**
 * verify the IP address if the feature is enabled
 */
if (SESSION_CHECK_IP_ADDRESS == 'True') {
  $ip_address = zen_get_ip_address();
  if (!$_SESSION['SESSION_IP_ADDRESS']) {
    $_SESSION['SESSION_IP_ADDRESS'] = $ip_address;
  }
  if ($_SESSION['SESSION_IP_ADDRESS'] != $ip_address) {
    zen_session_destroy();
    zen_redirect(zen_href_link(FILENAME_LOGIN));
  }
}
6 Jul 2010, 12:42 AM
#13
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: "Go to Checkout" gives 404 Page Not Found Error

Have you read this thread about the cookiedomain vs cookieDomain change?
http://www.zen-cart.com/forum/showthread.php?t=157106&highlight=cookiedomain

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

11 Jul 2010, 2:41 AM
#15
mehyourface avatar

mehyourface

New Zenner

Join Date:
Mar 2010
Posts:
23
Plugin Contributions:
0

Re: "Go to Checkout" gives 404 Page Not Found Error

Anyone have any suggestions?

11 Jul 2010, 4:20 AM
#16
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: "Go to Checkout" gives 404 Page Not Found Error

Did you then clear all cookies for your site and your cache?

Did you also try another browser just to ensure that you are not having an issue with the browser? In some cases, closing all sessions of the browser fixes things when working on changes involving sessions and cookies etc.

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

11 Jul 2010, 4:22 AM
#17
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: "Go to Checkout" gives 404 Page Not Found Error

NOTE: on shared certificates be sure you clean those cookies too that are related to your zen cart site ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!