Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

paypal - loosing session upon return


Recommended Posts

I'm having trouble tracking down the cause of a small problem....


I'm using the paypal payments module. Everything seems to work fine (as far as osc goes) and I get to paypal sandbox just fine and go thru the routine of entering payment details. It's when I'm done making the payment (a CC) - I click the button to "return to merchant" that the probem occurs. The problem is when it returns to my web site to complete the order with osc, it doesn't - instead it prompts for log on.


Everything else is working as far as I can tell. It should not be prompting me to log in again. I already did that before the purchase began. When I looked at the source html of the paypal page the contains the button, it's coded as a form with a GET action and the URL to my site and the checkout_process.php. It also includes the session id.


Anyone have any ideas why when I return from paypal to my site it's redirecting me to log in again? I know is must be something in my config or a setting somewhere.


In my store config/sessions section, everything is set to false.


Also, I've searched the forum and could not find anything related to this. So if you've experienced this and fixed it, I'd appreciate some help.

Link to comment
Share on other sites

most likely cookie setting errors in your configure.php file, post it here without the database connection info


File contents below. I removed the comments to clean it up for this post.



// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 define('HTTP_SERVER', 'https://frost.securenet-server.net/~mechwars');
 define('HTTPS_SERVER', 'https://frost.securenet-server.net/~mechwars');
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'frost.securenet-server.net/~mechwars');
 define('HTTPS_COOKIE_DOMAIN', 'frost.securenet-server.net/~mechwars');
 define('HTTP_COOKIE_PATH', '/mechstore/');
 define('HTTPS_COOKIE_PATH', '/mechstore/');
 define('DIR_WS_HTTP_CATALOG', '/mechstore/');
 define('DIR_WS_HTTPS_CATALOG', '/mechstore/');
 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', '/home/mechwars/public_html/mechstore/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

 define('DB_SERVER', 'localhost');
 define('DB_SERVER_USERNAME', '******');
 define('DB_SERVER_PASSWORD', '******');
 define('DB_DATABASE', '******');
 define('USE_PCONNECT', 'true');
 define('STORE_SESSIONS', 'mysql');

Link to comment
Share on other sites

"Good news everyone!"


I figured it out. I was looking at the cookies set on my browser (Firefox) and noticed that it did not match the HTTPS_COOKIE_DOMAIN in my config file. I forgot that cookie domains can not include path information. I had it set to "frost.securenet-server.net/~mechwars". The following settings caused the problem:


define('HTTPS_COOKIE_DOMAIN', 'frost.securenet-server.net/~mechwars');
define('HTTPS_COOKIE_PATH', '/mechstore/');


The following fixed the problem:


define('HTTPS_COOKIE_DOMAIN', 'frost.securenet-server.net');
define('HTTPS_COOKIE_PATH', '/~mechwars/mechstore/');


Seems simple enough, but it was a pain to figure out since I haven't worked with cookies in a very long time.


I hope this summary helps someone else out in the future.


:P Shameless plug:P

By the way...Since this problem appears fixed, my store will be opening soon. If you like robot combat action (ala BattleBots) come to Mechwars Robot Combat.

Link to comment
Share on other sites

got the same problem, but dont understand how to fix it. What are the settings surposed to be here? Does this have anything to do with it?


Session Directory /tmp

Force Cookie Use False

Check SSL Session ID True

Check User Agent False

Check IP Address False

Prevent Spider Sessions True

Recreate Session False

Session Directory



If sessions are file based, store them in this directory.


Date Added: 11/10/2004

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...