If this is your first visit, check our documentation. To post, register or login.
Forums / Installing Zen Cart / Installing on a Linux/Unix Server / log in/log out 404 -NOT double directory issue

log in/log out 404 -NOT double directory issue

Locked

Started by felixthehat on 27 Sep 2006, 1:40 PM · Views: 3,034

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
27 Sep 2006, 1:40 PM
#1
felixthehat avatar

felixthehat

New Zenner

Join Date:
Sep 2006
Posts:
17
Plugin Contributions:
0

Post #1 by felixthehat

Hi there, I am absolutely loving zen cart, I used to use oscommerce but that was a total pain to set up compared to this.

Right, my problem is, and I think its a config problem rather than a server issue, is that whenever I login or logout, it throws a 404 - although then going back/forward, it has worked fine.

I've scoured these forums and looks like the double directory issue, but it isnt - if anything its a *missing *directory issue - all I need help with - I think - is where in the config to add the appropriate site.

You can see the issue here: http://ikeyring.com/shop/

user: [email protected] pass: tester

config file:

// Define the webserver and path parameters
  // HTTP_SERVER is your Main webserver: eg, [url]http://www.yourdomain.com[/url]
  // HTTPS_SERVER is your Secure webserver: eg, [url]https://www.yourdomain.com[/url]
  define('HTTP_SERVER', 'http://ikeyring.com');
  define('HTTPS_SERVER', 'https://web26.secure-secure.co.uk');

  // Use secure webserver for checkout procedure?
  define('ENABLE_SSL', 'true');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
  // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
  define('DIR_WS_CATALOG', '/shop/');
  define('DIR_WS_HTTPS_CATALOG', '/ikeyring.com/shop/');

  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', '/');

// * DIR_FS_* = Filesystem directories (local/physical)
  //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
  define('DIR_FS_CATALOG', '/home/sites/ikeyring.com/public_html/shop/');

  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 our database connection
  define('DB_TYPE', 'mysql');
  define('DB_PREFIX', '');
  define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty
  define('DB_SERVER_USERNAME', '*********');
  define('DB_SERVER_PASSWORD', '*********');
  define('DB_DATABASE', '*********');
  define('USE_PCONNECT', 'false'); // use persistent connections?
  define('STORE_SESSIONS', 'db'); // leave empty '' for default handler or set to 'db'

  // The next 2 "defines" are for SQL cache support.
  // For SQL_CACHE_METHOD, you can select from:  none, database, or file
  // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache 
  // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
  // ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash  
  define('SQL_CACHE_METHOD', 'none'); 
  define('DIR_FS_SQL_CACHE', '/home/sites/ikeyring.com/public_html/shop/cache');

PS my host reckons the following:

I think it might be a configuration/code problem - the site is at
https://web26.secure-secure.co.uk/ikeyring.com/shop/index.php
but when I log in it goes to
https://web26.secure-secure.co.uk/shop/index.php
(note the lack of "ikeyring.com/" in the second URL).

In the Zen code, there's a lot of commented out code around the
redirects after a customer logs in

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));
}

I'm not an expert, but that looks like it's maybe going to
FILENAME_DEFAULT rather than $origin_href, and I'm guessing that the
default filename is for http not https?

Any help muchly, muchly appreciated,
thanks!

27 Sep 2006, 1:49 PM
#2
felixthehat avatar

felixthehat

New Zenner

Join Date:
Sep 2006
Posts:
17
Plugin Contributions:
0

Post #2 by felixthehat

hold the phone - i think i might just have found the answer .... will let you know

27 Sep 2006, 2:27 PM
#3
felixthehat avatar

felixthehat

New Zenner

Join Date:
Sep 2006
Posts:
17
Plugin Contributions:
0

Post #3 by felixthehat

nope. no joy. any help appreciated :dontgetit

27 Sep 2006, 3:14 PM
#4
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Post #4 by vger

define('HTTPS_SERVER', 'https://web26.secure-secure.co.uk/ikeyring.com');
define('DIR_WS_HTTPS_CATALOG', '/shop/');

Those are the correct settings.

Vger

27 Sep 2006, 4:11 PM
#5
felixthehat avatar

felixthehat

New Zenner

Join Date:
Sep 2006
Posts:
17
Plugin Contributions:
0

Post #5 by felixthehat

AGH! I could have sworn I tried that! thank you so so much - a second pair of eyes is always a winner.

thanks again mate :thumbsup:

28 Sep 2006, 8:11 PM
#6
felixthehat avatar

felixthehat

New Zenner

Join Date:
Sep 2006
Posts:
17
Plugin Contributions:
0

Post #6 by felixthehat

ah - actually that just seems to render my admin login as a 404 - gives a double directory URL ikeyring.com/ikeyring/ :dontgetit

back to the drawing board... all advice taken with great gratitude :)

28 Sep 2006, 10:21 PM
#7
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Post #7 by vger

Did you make sure to use this setting:

define('DIR_WS_HTTPS_CATALOG', '/shop/');

instead of what you previously had:

define('DIR_WS_HTTPS_CATALOG', '/ikeyring.com/shop/');

Vger

30 Sep 2006, 1:35 PM
#8
felixthehat avatar

felixthehat

New Zenner

Join Date:
Sep 2006
Posts:
17
Plugin Contributions:
0

Post #8 by felixthehat

Yep, I tried all that, and after a bit of fiddling I just changed

define('DIR_WS_HTTPS_ADMIN', '/ikeyring.com/shop/admin/');

to define('DIR_WS_HTTPS_ADMIN', '/shop/admin/');

and that seems to have fixed it successfully! (so far)

thanks for your help again mate! really appreciated