Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customers sent back to login page during checkout


ACE99

Recommended Posts

I just had my second case over the past two weeks where a customer emailed me because they couldn't make it through the checkout process. Apparently both customers mentioned that they would try to create an account (which completed successfully) and then try to checkout, but on the shipment or payment page or something, they would be sent back to the login screen again. This looping occurs over and over for them. One customer even tried again at night with his same account and tried to checkout again, but again he failed.

 

I still have orders coming in, so the process works for the majority of customers. But still, it worries me that two have emailed me with the same problem. Who knows how many more sales have been lost because of this?

 

Anyone have any ideas or suggestions?

Link to comment
Share on other sites

This is nearly always caused by errors in the includes/configure.php file.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

Ok, I'm desperate. I checked the thread above but everything looks ok. here are my settings:

 

define('HTTP_SERVER', 'http://www.XXXXXXXXX.com/'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://www.XXXXXXXX.com/'); // eg, https://localhost - should not be empty for productive servers

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

define('HTTP_COOKIE_DOMAIN', 'http://www.XXXXXXXX.com/');

define('HTTPS_COOKIE_DOMAIN', 'https://www.XXXXXXXXX.com/');

define('HTTP_COOKIE_PATH', '');

define('HTTPS_COOKIE_PATH', '');

define('DIR_WS_HTTP_CATALOG', '');

define('DIR_WS_HTTPS_CATALOG', '');

define('DIR_WS_IMAGES', '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', '/usr/home/XXXXXXX/public_html/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

// define our database connection

define('DB_SERVER', 'XXXXXX'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'XXXXXX');

define('DB_SERVER_PASSWORD', 'XXXXXX');

define('DB_DATABASE', 'XXXXXXXX');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

 

 

 

My Session Settings in the Admin are as follows:

 

Session directory: /tmp

Force cookie use: false

Check SSL session ID: false

Check USER Agent: false

Check IP address: true

Prevent Spider Sessions: true

Recreate sessions: true

 

Gzip is turned on with compression of 1. Cache is turned on.

 

I have STS contribution, AuthorizeNet 1.7 for AIM contribution, Login a la amazon.

 

Again, MOST customers are checking out fine, but about 1 out of every 10 orders has a problem! That's not good.

Link to comment
Share on other sites

Lose the http and the https in the cookies.

 

define('HTTP_COOKIE_DOMAIN', 'www.XXXXXXXX.com/');

define('HTTPS_COOKIE_DOMAIN', 'www.XXXXXXXXX.com/');

 

What's with these? Where's the folder? Are you running in catalog or root? They shouldn't be blank.

 

define('HTTP_COOKIE_PATH', '');

define('HTTPS_COOKIE_PATH', '');

define('DIR_WS_HTTP_CATALOG', '');

define('DIR_WS_HTTPS_CATALOG', '');

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

do you think having the "check IP address" set to "true" could be part of the problem?

Nope.

 

Remove the trailing slash from the end of the urls and change to

 

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

 

Follow the standard wherever possible. If this doesn't help and you're still unwilling to post the url you're going to be on your own.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

I am having the same problem on two different websites using osCommerce CRE loaded v6. The problem is that I can create an account, get to the "Success! your account has been created" page and then when I click on continue, it takes me to the home page instead of the rest of the checkout process. When I get to the home page (which totally confuses the user as to why they are not asked to pay for anything or give a shipping address,) my shopping cart is empty. If I then add products and checkout after I am logged into my new account, then the checkout process works fine, but who wans to add an item, go to pay for it, then get taken to the home page where they have to add the item again, re-login, and then can pay for it and be done with it? My URL is http://www.recreationoutlet.com and below is taken from my includes/configure.php file, can anyone help? AlanR? Anyone who knows what they are talking about?:

 

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://www.recreationoutlet.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers

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

define('HTTP_COOKIE_DOMAIN', 'www.recreationoutlet.com');

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

 

//Added for BTS1.0

define('DIR_WS_TEMPLATES', 'templates/');

define('DIR_WS_CONTENT', DIR_WS_TEMPLATES . 'content/');

define('DIR_WS_JAVASCRIPT', DIR_WS_INCLUDES . 'javascript/');

//End BTS1.0

define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');

define('DIR_FS_CATALOG', '/home/httpd/vhosts/recreationoutlet.com/httpdocs/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

"Your focus is your reality"

Link to comment
Share on other sites

Answered my own question (again) with the help of Phesis at chainreactionweb.com and a post there! thanks CRE!

 

Anyone else having this problem should check their includes/configure.php to be like:

 

define('HTTP_SERVER', 'http://www.mywebsite.com'); // eg, http://localhost - should not be empty for productive servers

Note: What in the A record of the DNS

define('HTTPS_SERVER', 'https://mywebsite.authsecure.com'); // eg, https://localhost - should not be empty for productive servers

Note: where the certificate is mapped to

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

Note: If you want to use SSL set true

define('HTTP_COOKIE_DOMAIN', 'www.mywebsite.com');

Notes This should be the same as HTTP_SERVER or sessions can get lost. This may have to be different because of how the server is set up and security procedures and settings but highly unlikely that it should be.

define('HTTPS_COOKIE_DOMAIN', 'mywebsite.authsecure.com');

Note: same as the HTTPS_SERVER but no https: in front of it.

 

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

Note the above setting should be the same and point to the root of the web site

not the root of the server.

 

 

define('STORE_SESSIONS', 'MYSQL'); // leave empty '' for default handler or set to 'mysql'

See note below on MYSQL sessions for sheard servers.

 

 

the following are admin settings that shoulds be checked:

 

 

Session Directory /tmp

Force Cookie Use True

Check SSL Session ID False

Check User Agent False

Check IP Address False

Prevent Spider Sessions True

Recreate Session False

"Your focus is your reality"

Link to comment
Share on other sites

  • 1 month later...

I think this is the info I've been looking for! But I have no experience with SSL at all... How do I lookup ssl certificate info? :blink: Our site is being run on ipowerweb.com, and osCommerce was installed using their tool. It appears that they updated to osCommerce 2.2-MS2, because that what it shows in the server info page.

 

Thanks.

 

ps. If anyone's interested.... I've been having lots of other problems with ipowerweb. I think I'd look for a different host next time....

Link to comment
Share on other sites

Ok, i'm now having the same issues! I can't figure out what's going on. I've read the suggestions above & nothing seems to work!

Link to comment
Share on other sites

  • 8 months later...
Nope.

 

Remove the trailing slash from the end of the urls and change to

 

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

 

Follow the standard wherever possible. If this doesn't help and you're still unwilling to post the url you're going to be on your own.

Old post but to anyone reading this. It is indeed the 'check ip' option set to 'true' that causes this problem. Took me some time to realize this.

Link to comment
Share on other sites

Force Cookie Use True

 

Wrong! Only set this to True if you have no ssl or a full ssl cert. If you use a shared ssl cert all of your customers will end up on the cookie_usage.php page telling them to enable cookies in their browser (even if they are already enabled). Basically, your customers will not be able to move anywhere or do anything on your website.

 

CRE Loaded has its own support forum - this is the osCommerce Support Forum. Please post CRE Loaded problems to their forum and not to this one.

 

Vger

Link to comment
Share on other sites

  • 3 months later...

I'm having the same problem, but it might be a different cause. I was still getting orders but I was also getting hate mail from customers getting kicked out of the store and being sent back to the login page. SO! I made an error button where the customer could click on it, say what was wrong, and then It would email me the message + all of the browsers info. I noticed that for ALL my complaints that the cookie was successfully planted. I haven't received any complaints where cookie usage came back no. I'm not even sure if this means they have cookies set.

 

This is what I did. In Login.php I run this:

$name="benbenben";
setcookie("uname", $name, time()+36000);

Then on the error success page I have this function:

if (isset($_COOKIE["uname"])) 
$message = $message . "COOKIE YES";
else
$message = $message . "COOKIE NO";

ONLY emails with COOKIE YES are having problems! I can't make MY office computer give me a cookie yes so I can't immitate the probem to fix it. I'm getting pretty desperate here! Any help would be great. Is it my configure.php file? I never really touch that.

Link to comment
Share on other sites

This is my configure file. I don't have force cookie on, and I set the IP check to false:

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 define('HTTP_SERVER', 'http://tradrack.netfirms.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://tradrack.sslpowered.com'); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'tradrack.netfirms.com');
 define('HTTPS_COOKIE_DOMAIN', 'tradrack.sslpowered.com');
 define('HTTP_COOKIE_PATH', '/TradShop/nfoscomm/catalog/');
 define('HTTPS_COOKIE_PATH', '/TradShop/nfoscomm/catalog/');
 define('DIR_WS_HTTP_CATALOG', '/TradShop/nfoscomm/catalog/');
 define('DIR_WS_HTTPS_CATALOG', '/TradShop/nfoscomm/catalog/');
 define('DIR_WS_IMAGES', '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', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
 define('DB_SERVER', 'MYSQLHOST'); // eg, localhost - should not be empty for productive servers
 define('DB_SERVER_USERNAME', 'xxxxxxxxxxxxx');
 define('DB_SERVER_PASSWORD', 'xxxxxxxxxx');
 define('DB_DATABASE', 'xxxxxx');
 define('USE_PCONNECT', 'false'); // use persistent connections?
 define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

Link to comment
Share on other sites

If you have 'Force Cookie Use' set to true in your 'admin' panel then set it to false. You can't use this feature with shared ssl, only with no ssl or full ssl (domains must match).

 

Vger

Link to comment
Share on other sites

If you have 'Force Cookie Use' set to true in your 'admin' panel then set it to false.  You can't use this feature with shared ssl, only with no ssl or full ssl (domains must match).

 

Vger

 

It is set to False, but I am still getting the same problem. Why would you think that all of my customers complaint emails have the "cookie yes" shouldn't the complaints be coming from "cookie nos?".

 

This is the link to the browser checker that I wrote:

https://tradrack.sslpowered.com/TradShop/nf...talog/login.php

If you click on the button, it gives you a confirmation and says right away "cookie no" at the bottom for me. I've tried it on 6 different computers and it ONLY will say "cookie no". If I can't recreate my OWN settings to say "cookie yes" I feel like I can't fix it. I tried changing check IP to false (as suggested above) don't know if it made any difference, I only know if I stop getting emails from angry customers.

 

-TradRack

Link to comment
Share on other sites

  • 2 years later...

Hi

I have been pouring over threads for days now in regard to exactly this problem. I see peoples issues being solved with subtle code changes in the configure.php file. I have tried all these thing but not having any luck.

On my store flowergirloutlet.com one can make an account, shop, and start to checkout. When you get to the checkout payment page it takes you right back to the login page.

 

I have asked my host to see that I have installed my ssl properly and they said yes.

Here is my configure.php code

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://flowergirloutlet.com/'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'http://flowergirloutlet.com/'); // eg, https://localhost - should not be empty for productive servers

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

define('HTTP_COOKIE_DOMAIN', 'flowergirloutlet.com');

define('HTTPS_COOKIE_DOMAIN', 'flowergirloutlet.com');

define('HTTP_COOKIE_PATH', './ ');

define('HTTPS_COOKIE_PATH', './');

define('DIR_WS_HTTP_CATALOG', './ ');

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

define('DIR_WS_IMAGES', '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', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

// define our database connection

define('DB_SERVER', 'xxxxxxxx'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'xxxxxxxxxxxxxx');

define('DB_SERVER_PASSWORD', 'xxxxxxxxxx');

define('DB_DATABASE', 'xxxxxxxxxxxxx');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

 

 

Sorry if this dosent make sense. Its my first store and Ive learned everything from these boards, but now im stuck.

Link to comment
Share on other sites

  • 1 month later...

Hi,

 

I was having the same problem with my store. When someone would log in or register an account in the checkout process, it would direct them to index.php rather than checkout_shipping.php. I tried everything and couldn't figure it out. Ultimately I solved the problem by opening create_account.php and whatever other files were directing the user to index.php, and did a search for all of the tep_redirect's and and changed them all to FILENAME_CHECKOUT_SHIPPING because for some reason the code that's supposed to keep track of what page you're coming from and send you back there isn't working right.

 

I don't know if this is the 'right' way to fix the problem, but it definitely worked for me.

 

Zach

Link to comment
Share on other sites

  • 3 weeks later...

I was having the exact same problem and contrary to what others have said, I changed the cookie domain lines in configure.php from

 

define('HTTP_COOKIE_DOMAIN', '.becomingmommy.com');

define('HTTPS_COOKIE_DOMAIN', '.becomingmommy.com');

 

to

 

define('HTTP_COOKIE_DOMAIN', 'localhost');

define('HTTPS_COOKIE_DOMAIN', 'localhost');

 

and it worked. It seems the real problem is that the osCsid is not getting passed along. When you hover over a link does it look like:

 

http://www.becomingmommy.com/maternity-clo...7f5cf2d3d6480bd

 

or

 

http://www.becomingmommy.com/maternity-clo...ps/short+sleeve?

 

If it is the latter, I strongly suspect that it is a cookie domain issue.

 

It's worth nothing that I have the phpBB2 Integration v1.3 extension installed and the change I made tonight will supposedly will screw up the phpbb forums I have on the site, but I'd rather have the store working first.

 

 

Hope this helps!

 

Michael

 

 

Hi

I have been pouring over threads for days now in regard to exactly this problem. I see peoples issues being solved with subtle code changes in the configure.php file. I have tried all these thing but not having any luck.

On my store flowergirloutlet.com one can make an account, shop, and start to checkout. When you get to the checkout payment page it takes you right back to the login page.

 

I have asked my host to see that I have installed my ssl properly and they said yes.

Here is my configure.php code

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://flowergirloutlet.com/'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'http://flowergirloutlet.com/'); // eg, https://localhost - should not be empty for productive servers

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

define('HTTP_COOKIE_DOMAIN', 'flowergirloutlet.com');

define('HTTPS_COOKIE_DOMAIN', 'flowergirloutlet.com');

define('HTTP_COOKIE_PATH', './ ');

define('HTTPS_COOKIE_PATH', './');

define('DIR_WS_HTTP_CATALOG', './ ');

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

define('DIR_WS_IMAGES', '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', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

// define our database connection

define('DB_SERVER', 'xxxxxxxx'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'xxxxxxxxxxxxxx');

define('DB_SERVER_PASSWORD', 'xxxxxxxxxx');

define('DB_DATABASE', 'xxxxxxxxxxxxx');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

Sorry if this dosent make sense. Its my first store and Ive learned everything from these boards, but now im stuck.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...