If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / Login Suddenly Results in 404 Page

Login Suddenly Results in 404 Page

Started by robertwhitis on 18 Aug 2012, 7:24 PM · Views: 2,334

Results 1 to 20 of 20
18 Aug 2012, 7:24 PM
#1
robertwhitis avatar

robertwhitis

New Zenner

Join Date:
Mar 2011
Posts:
42
Plugin Contributions:
0

Login Suddenly Results in 404 Page

Here is my frontside config settings, as you can see, shared SSL. The site is customized, however, everything was working fine, tested the site fully, including payment processing, went live, and now all of a sudden, no one can login...I am totally stumped because as far as I know, no changes have been made to any files since testing and launch of the site, at which time there were no login issues.

The HTTP_SERVER setting is set to http://mydomain.com where mydomain.com is my real URL, just not typing it here because I don't want it to show up in Google SERPs for Zen Cart help ^ ^ lol

  
  define('HTTP_SERVER', 'http://mydomain.com');
  define('HTTPS_SERVER', 'https://server309.webhostingpad.com/~comm6179');
  define('ENABLE_SSL', 'true');
  define('DIR_WS_CATALOG', '/');
  define('DIR_WS_HTTPS_CATALOG', '/');
  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_INCLUDES', 'includes/');
  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', DIR_WS_CATALOG . 'pub/');
  define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');
  define('DIR_WS_PHPBB', '/');
  define('DIR_FS_CATALOG', '/home2/comm6179/public_html/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
  define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
  define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
  define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
  define('SQL_CACHE_METHOD', 'none'); 
  define('DIR_FS_SQL_CACHE', '/home2/comm6179/public_html/cache');
  define('STORE_SESSIONS', 'db');

ShortURL to site: http://alturl.com/phuzd

Any Help Greatly Appreciated!

18 Aug 2012, 7:42 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,140
Plugin Contributions:
56

Re: Login Suddenly Results in 404 Page

I'm not sure what you've done with your customizations, but your login page (main_page=login) and your create_account page (main_page=create_account) are essentially the same ... allowing me to create an account but with no possibility to actually login with my previously-created credentials.

18 Aug 2012, 7:42 PM
#3
robertwhitis avatar

robertwhitis

New Zenner

Join Date:
Mar 2011
Posts:
42
Plugin Contributions:
0

Re: Login Suddenly Results in 404 Page

Session settings from admin:

Session Directory - /home2/comm6179/public_html/cache
Cookie Domain - True
Force Cookie Use - False
Check SSL Session ID - True
Check User Agent - False
Check IP Address - False
Prevent Spider Sessions - False
Recreate Session - True
IP to Host Conversion Status - true
Use root path for cookie path - False
Add period prefix to cookie domain - True

Since I'm using a customized template, I also tried setting the template back to the default template. Upon doing so the issues remained, so I reverted back to the customized template.

18 Aug 2012, 7:43 PM
#4
robertwhitis avatar

robertwhitis

New Zenner

Join Date:
Mar 2011
Posts:
42
Plugin Contributions:
0

Re: Login Suddenly Results in 404 Page

lat9:

I'm not sure what you've done with your customizations, but your login page (main_page=login) and your create_account page (main_page=create_account) are essentially the same ... allowing me to create an account but with no possibility to actually login with my previously-created credentials.

The login fields are at the top of the site in the header, which is why they were removed from those pages.

18 Aug 2012, 7:47 PM
#5
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,140
Plugin Contributions:
56

Re: Login Suddenly Results in 404 Page

So, if I enter my password incorrectly ... where do I get sent to re-enter the value and where does the error message get displayed?

What, if any, changes did you make to /includes/modules/pages/login/header_php.php? That's the file that validates the userid/password entered on the login page, sets the proper session variables and then redirects the customer to the page they were at/going-to before the login process.

18 Aug 2012, 7:59 PM
#6
robertwhitis avatar

robertwhitis

New Zenner

Join Date:
Mar 2011
Posts:
42
Plugin Contributions:
0

Re: Login Suddenly Results in 404 Page

If you enter your password incorrectly, you are taken to the 'login' page where the error message is displayed, and you would simply enter your login information into the fields at the top of the site to attempt to login with the correct password.

The login form is set to run over SSL (set to SSL in the zen_draw_form function), so I set that to NONSSL and was able to login fine, however, then when you click on any SSL link (such as checkout, or my account) I get the "Whoops!" message. It appears that if I set it to NONSSL everything is fine until you switch to a SSL page, at which point something goes wrong - however, I was still logged in, so it would seem that the session wasn't lost. I set things back to SSL after conducting this test.

I have made no changes to the header_php.php file you mentioned, but perhaps I need to customize that. Contents of that file below:

<?php
/**
 * Login Page
 *
 * @package page
 * @copyright Copyright 2003-2011 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: header_php.php 18695 2011-05-04 05:24:19Z drbyte $
 */

// This should be first line of the script:
$zco_notifier->notify('NOTIFY_HEADER_START_LOGIN');

// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started)
if ($session_started == false) {
  zen_redirect(zen_href_link(FILENAME_COOKIE_USAGE));
}

// if the customer is logged in already, redirect them to the My account page
if (isset($_SESSION['customer_id']) and $_SESSION['customer_id'] != '') {
  zen_redirect(zen_href_link(FILENAME_ACCOUNT, '', 'SSL'));
}

require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_CREATE_ACCOUNT));

$error = false;
if (isset($_GET['action']) && ($_GET['action'] == 'process')) {
  $email_address = zen_db_prepare_input($_POST['email_address']);
  $password = zen_db_prepare_input($_POST['password']);

  /* Privacy-policy-read does not need to be checked during "login"
  if (DISPLAY_PRIVACY_CONDITIONS == 'true') {
  if (!isset($_POST['privacy_conditions']) || ($_POST['privacy_conditions'] != '1')) {
  $error = true;
  $messageStack->add('create_account', ERROR_PRIVACY_STATEMENT_NOT_ACCEPTED, 'error');
  }
  }
  */

    // Check if email exists
    $check_customer_query = "SELECT customers_id, customers_firstname, customers_lastname, customers_password,
                                    customers_email_address, customers_default_address_id,
                                    customers_authorization, customers_referral
                           FROM " . TABLE_CUSTOMERS . "
                           WHERE customers_email_address = :emailAddress";

    $check_customer_query  =$db->bindVars($check_customer_query, ':emailAddress', $email_address, 'string');
    $check_customer = $db->Execute($check_customer_query);

    if (!$check_customer->RecordCount()) {
      $error = true;
      $messageStack->add('login', TEXT_LOGIN_ERROR);
    } elseif ($check_customer->fields['customers_authorization'] == '4') {
      // this account is banned
      $zco_notifier->notify('NOTIFY_LOGIN_BANNED');
      $messageStack->add('login', TEXT_LOGIN_BANNED);
    } else {
      // Check that password is good
      if (!zen_validate_password($password, $check_customer->fields['customers_password'])) {
        $error = true;
        $messageStack->add('login', TEXT_LOGIN_ERROR);
      } else {
        if (SESSION_RECREATE == 'True') {
          zen_session_recreate();
        }

        $check_country_query = "SELECT entry_country_id, entry_zone_id
                              FROM " . TABLE_ADDRESS_BOOK . "
                              WHERE customers_id = :customersID
                              AND address_book_id = :addressBookID";

        $check_country_query = $db->bindVars($check_country_query, ':customersID', $check_customer->fields['customers_id'], 'integer');
        $check_country_query = $db->bindVars($check_country_query, ':addressBookID', $check_customer->fields['customers_default_address_id'], 'integer');
        $check_country = $db->Execute($check_country_query);

        $_SESSION['customer_id'] = $check_customer->fields['customers_id'];
        $_SESSION['customer_default_address_id'] = $check_customer->fields['customers_default_address_id'];
        $_SESSION['customers_authorization'] = $check_customer->fields['customers_authorization'];
        $_SESSION['customer_first_name'] = $check_customer->fields['customers_firstname'];
        $_SESSION['customer_last_name'] = $check_customer->fields['customers_lastname'];
        $_SESSION['customer_country_id'] = $check_country->fields['entry_country_id'];
        $_SESSION['customer_zone_id'] = $check_country->fields['entry_zone_id'];

        $sql = "UPDATE " . TABLE_CUSTOMERS_INFO . "
              SET customers_info_date_of_last_logon = now(),
                  customers_info_number_of_logons = customers_info_number_of_logons+1
              WHERE customers_info_id = :customersID";

        $sql = $db->bindVars($sql, ':customersID',  $_SESSION['customer_id'], 'integer');
        $db->Execute($sql);
        $zco_notifier->notify('NOTIFY_LOGIN_SUCCESS');

        // bof: contents merge notice
        // save current cart contents count if required
        if (SHOW_SHOPPING_CART_COMBINED > 0) {
          $zc_check_basket_before = $_SESSION['cart']->count_contents();
        }

        // bof: not require part of contents merge notice
        // restore cart contents
        $_SESSION['cart']->restore_contents();
        // eof: not require part of contents merge notice

        // check current cart contents count if required
        if (SHOW_SHOPPING_CART_COMBINED > 0 && $zc_check_basket_before > 0) {
          $zc_check_basket_after = $_SESSION['cart']->count_contents();
          if (($zc_check_basket_before != $zc_check_basket_after) && $_SESSION['cart']->count_contents() > 0 && SHOW_SHOPPING_CART_COMBINED > 0) {
            if (SHOW_SHOPPING_CART_COMBINED == 2) {
              // warning only do not send to cart
              $messageStack->add_session('header', WARNING_SHOPPING_CART_COMBINED, 'caution');
            }
            if (SHOW_SHOPPING_CART_COMBINED == 1) {
              // show warning and send to shopping cart for review
              $messageStack->add_session('shopping_cart', WARNING_SHOPPING_CART_COMBINED, 'caution');
              zen_redirect(zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'));
            }
          }
        }
        // eof: contents merge notice

        if (sizeof($_SESSION['navigation']->snapshot) > 0) {
          //    $back = sizeof($_SESSION['navigation']->path)-2;
          //if (isset($_SESSION['navigation']->path[$back]['page'])) {
          //    if (sizeof($_SESSION['navigation']->path)-2 > 0) {
          $origin_href = zen_href_link($_SESSION['navigation']->snapshot['page'], zen_array_to_string($_SESSION['navigation']->snapshot['get'], array(zen_session_name())), $_SESSION['navigation']->snapshot['mode']);
          //            $origin_href = zen_back_link_only(true);
          $_SESSION['navigation']->clear_snapshot();
          zen_redirect($origin_href);
        } else {
          zen_redirect(zen_href_link(FILENAME_DEFAULT, '', $request_type));
        }
      }
    }
}
if ($error == true) {
  $zco_notifier->notify('NOTIFY_LOGIN_FAILURE');
}

$breadcrumb->add(NAVBAR_TITLE);

// Check for PayPal express checkout button suitability:
$paypalec_enabled = (defined('MODULE_PAYMENT_PAYPALWPP_STATUS') && MODULE_PAYMENT_PAYPALWPP_STATUS == 'True' && defined('MODULE_PAYMENT_PAYPALWPP_ECS_BUTTON') && MODULE_PAYMENT_PAYPALWPP_ECS_BUTTON == 'On');
// Check for express checkout button suitability:
$ec_button_enabled = ($paypalec_enabled && ($_SESSION['cart']->count_contents() > 0 && $_SESSION['cart']->total > 0));


// This should be last line of the script:
$zco_notifier->notify('NOTIFY_HEADER_END_LOGIN');
18 Aug 2012, 8:46 PM
#7
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,140
Plugin Contributions:
56

Re: Login Suddenly Results in 404 Page

You might be getting bit because your header login form (a nice idea, in practice, by the way) is posting from a non-SSL page to an SSL page. Try making a copy of /includes/init_includes/init_sanitize.php into /includes/init_includes/overrides and then edit that file (for 1.5.0), lines 23-33 currently read:

  if ((isset ( $_GET ['action'] ) || isset($_POST['action']) ) && $_SERVER['REQUEST_METHOD'] == 'POST')
  {
    $mainPage = isset($_GET['main_page']) ? $_GET['main_page'] : FILENAME_DEFAULT;
    if (!in_array($mainPage, $csrfBlackList))
    {
      if ((! isset ( $_SESSION ['securityToken'] ) || ! isset ( $_POST ['securityToken'] )) || ($_SESSION ['securityToken'] !== $_POST ['securityToken']))
      {
        zen_redirect ( zen_href_link ( FILENAME_PAGE_NOT_FOUND, '', $request_type ) );
      }
    }
  }

and change to

  if ((isset ( $_GET ['action'] ) || isset($_POST['action']) ) && $_SERVER['REQUEST_METHOD'] == 'POST')
  {
    $mainPage = isset($_GET['main_page']) ? $_GET['main_page'] : FILENAME_DEFAULT;
    if (!in_array($mainPage, $csrfBlackList))
    {
      if ((! isset ( $_SESSION ['securityToken'] ) || ! isset ( $_POST ['securityToken'] )) || ($_SESSION ['securityToken'] !== $_POST ['securityToken']))
      {
        zen_redirect ( zen_href_link ( FILENAME_TIME_OUT, '', $request_type ) );
      }
    }
  }

I'm guessing that the change will result in the login request being taken to the time_out page now instead of page_not_found.

18 Aug 2012, 8:51 PM
#8
robertwhitis avatar

robertwhitis

New Zenner

Join Date:
Mar 2011
Posts:
42
Plugin Contributions:
0

Re: Login Suddenly Results in 404 Page

admin config file:

  define('HTTP_SERVER', 'https://server309.webhostingpad.com/~comm6179');
  define('HTTPS_SERVER', 'https://server309.webhostingpad.com/~comm6179');
  define('HTTP_CATALOG_SERVER', 'http://my_domain.com');
  define('HTTPS_CATALOG_SERVER', 'https://server309.webhostingpad.com/~comm6179');
  define('ENABLE_SSL_ADMIN', 'false');
  define('ENABLE_SSL_CATALOG', 'false');
  $t1 = parse_url(HTTP_SERVER);$p1 = $t1['path'];$t2 = parse_url(HTTPS_SERVER);$p2 = $t2['path'];
  define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p1) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
  define('DIR_WS_CATALOG', '/');
  define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p2) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
  define('DIR_WS_HTTPS_CATALOG', '/');
  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
  define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
  define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
  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_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');
  define('DIR_FS_ADMIN', realpath(dirname(__FILE__) . '/../') . '/');
  define('DIR_FS_CATALOG', '/home2/comm6179/public_html/');
  define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
  define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
  define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
  define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
  define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
  define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('SQL_CACHE_METHOD', 'none'); 
  define('DIR_FS_SQL_CACHE', '/home2/comm6179/public_html/cache');
  define('STORE_SESSIONS', 'db'); 
18 Aug 2012, 8:55 PM
#9
robertwhitis avatar

robertwhitis

New Zenner

Join Date:
Mar 2011
Posts:
42
Plugin Contributions:
0

Re: Login Suddenly Results in 404 Page

lat9:

You might be getting bit because your header login form (a nice idea, in practice, by the way) is posting from a non-SSL page to an SSL page. Try making a copy of /includes/init_includes/init_sanitize.php into /includes/init_includes/overrides and then edit that file (for 1.5.0).

I'm guessing that the change will result in the login request being taken to the time_out page now instead of page_not_found.

You are correct, I made that change and it now takes me to the time_out page when I try to login, however, what did that accomplish?

19 Aug 2012, 1:30 PM
#10
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,140
Plugin Contributions:
56

Re: Login Suddenly Results in 404 Page

That change validated where you're getting the redirect from. Essentially, your code is attempting to POST data from one page to another. Have you considered the fact that if I fill in your login form while I'm on your home page, the data is passed unencrypted because your home page is not an SSL page?

19 Aug 2012, 6:38 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Login Suddenly Results in 404 Page

lat9:

Have you considered the fact that if I fill in your login form while I'm on your home page, the data is passed unencrypted because your home page is not an SSL page?
Careful about that.

The POST is sent to the URL specified in the <form>'s action= parameter ... and if that action= parameter is an https URL then the POST is indeed sent encrypted. It doesn't matter whether the source page on which the form was displayed was in https or not. The encryption is determined by the action= URL.
It's a common misconception. But the padlock only assures that the content being displayed was delivered encrypted over SSL.

robertwhitis:

everything was working fine, tested the site fully,... went live, and now all of a sudden, no one can loginSo what's different between before vs after?
What exactly did "went live" mean? What did you "do" to "go live"? Did you simply pour a few pints and say "okay we're live", or did you do something to the server, move files around, change hosts, upload something, what?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

20 Aug 2012, 11:26 AM
#12
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,140
Plugin Contributions:
56

Re: Login Suddenly Results in 404 Page

Thanks for setting me straight, DrByte; apologies for the misinformed post.

20 Aug 2012, 12:02 PM
#13
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,140
Plugin Contributions:
56

Re: Login Suddenly Results in 404 Page

OK, it's not just a problem with the login-form-in-header ... I clicked on the Register button in your header, disabled javascript in my browser and clicked Submit on the create_account form ... and was also taken to the timeout page, so it's some general setting that's affecting your SSL pages rather than just one form.

I noticed in one of your previous posts that you've got your admin's Configuration->Sessions->Check SSL Session ID set to True (non-default). I have no idea what processing that setting enables/disables, but what happens if you change it back to False?

20 Aug 2012, 6:08 PM
#14
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,140
Plugin Contributions:
56

Re: Login Suddenly Results in 404 Page

I've got a site that uses a shared SSL connection, so I thought I'd look to see what's different between the two installations. I turned off javascript in my browser, clicked the Register button in your header and then clicked the Submit button from your create_account page.

Your host is issuing a 302 redirect after the post; I think but do not know that this is the source of your problem. There are a bunch of people on webmasterworld.com that are very knowledgeable in this stuff (as are some of the people on this forum).

I'm using the "Live HTTP Headers" add-on for FireFox to view these messages.

https://server309.webhostingpad.com/~comm6179/index.php?main_page=create_account&zenid=<value 1>

POST /~comm6179/index.php?main_page=create_account&zenid=<value 1>HTTP/1.1
Host: server309.webhostingpad.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Referer: https://server309.webhostingpad.com/~comm6179/index.php?main_page=login&zenid=<value 2>
Cookie: __utma=218166299.1727778918.1345318472.1345322284.1345463626.3; __utmc=218166299; __utmz=218166299.1345463626.3.3.utmcsr=yourwebsite.com|utmccn=(referral)|utmcmd=referral|utmcct=/
Content-Type: application/x-www-form-urlencoded
Content-Length: 271
securityToken=<value 3>&action=process&email_pref_html=email_format&firstname=&lastname=&street_address=&suburb=&city=&zone_id=&state=%C2%A0&postcode=&zone_country_id=223&telephone=&email_address=&password=&confirmation=&email_format=TEXT&x=42&y=14


HTTP/1.1 302 Moved Temporarily
Date: Mon, 20 Aug 2012 17:42:06 GMT
Server: Apache
X-Powered-By: PHP/5.3.14
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: zenid=<value 4>; path=/~comm6179; domain=yourwebsite.com; HttpOnly
Location: http://yourwebsite.com/index.php?main_page=time_out&zenid=<value 4>
Content-Length: 0
Connection: close
Content-Type: text/html
21 Aug 2012, 7:33 AM
#15
robertwhitis avatar

robertwhitis

New Zenner

Join Date:
Mar 2011
Posts:
42
Plugin Contributions:
0

Re: Login Suddenly Results in 404 Page

I think I have resolved the issue.

First of all, thanks for the responses, both of you. I changed the init_sanitize file back to default since I believe I have resolved the issue.

Basically, I was unaware that my hosting company offered CSR for their shared SSL certs. I called them and discussed my issue and they informed me that I could simply fill out a form to get the CSR taken care of, so now I have my branded https URL instead of the shared SSL URL.

Once that process was complete, I setup the configure.php files to use the https URL for everything, set up a permanent 301 redirect from www to http:// since the CSR didn't cover both www and http:// requests.

Once I did that, it appears everything seems to be working fine.

Based on what DrByte brought to light concerning the action URL for the header login, I believe I am OK, as that action URL was left as it was by defualt (action=process), and given that the entire site is running over the https protocol, I believe there should be no issues with data being sent unencrypted, is this correct?

As far as what "went live" meant - the site was developed on the live server, so "went live" basically just meant testing of the site was complete, the only change that was made to anything after testing was conducted, was to the .htaccess file to begin allowing search engine spiders to index the website. We tested all of the account features, payment processing, etc., in all 4 major browsers and didn't experience these issues. After that, changes were made to the site, but nothing in an area that should affect these issues (adding Facebook and Flickr icons to the footer, for instance), however, it is possible that in uploading files in making those changes I could have made a mistake without realizing it. Three weeks later all of a sudden these issues cropped up, so I'm honestly not sure what triggered them, I hope they are resolved now.

Thanks again lat9 and DrByte!

21 Aug 2012, 8:18 AM
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Login Suddenly Results in 404 Page

robertwhitis:

I setup the configure.php files to use the https URL for everythingYou should probably NOT use https for EVERYTHING.In your /includes/configure.php file, you should still be using an http address in the HTTP_SERVER definition.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Aug 2012, 8:48 AM
#17
robertwhitis avatar

robertwhitis

New Zenner

Join Date:
Mar 2011
Posts:
42
Plugin Contributions:
0

Re: Login Suddenly Results in 404 Page

DrByte:

You should probably NOT use https for EVERYTHING.In your /includes/configure.php file, you should still be using an http address in the HTTP_SERVER definition.

Okay, if I change the HTTP_SERVER definition to the normal http URL in the config files, do I also need to remove the 301 redirect?

I'm curious why it's not a good idea to use https sitewide?

12 Jul 2014, 1:33 PM
#18
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Re: Login Suddenly Results in 404 Page

robertwhitis:

Okay, if I change the HTTP_SERVER definition to the normal http URL in the config files, do I also need to remove the 301 redirect?

I'm curious why it's not a good idea to use https sitewide?

I had same issue and I change recreate session to False and it corrects the problem.

Is there anything wrong with keeping recreate session to False?

13 Jul 2014, 1:36 AM
#19
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Login Suddenly Results in 404 Page

jsarwar:

I had same issue and I change recreate session to False and it corrects the problem.

Is there anything wrong with keeping recreate session to False?
Yes. You've opened up a security problem.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

13 Jul 2014, 1:39 AM
#20
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Re: Login Suddenly Results in 404 Page

DrByte:

Yes. You've opened up a security problem.

Thank you for letting me know. I reversed it and tried on different computer and don't seems to be issue now. Probably cookies/caches were causing issue on my lappy.