Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

PHP Session not Working Correctly

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore F.A.Q/Instructions › PHP Session not Working Correctly

Tagged: caching, CDN, check out page, permission denied (13), PHP Session, php session error, php session issue, PHP session not working, php warning, session_start, W3 Total Cache, web hosting

  • This topic has 68 replies, 24 voices, and was last updated 7 years, 2 months ago by wzp.
Viewing 15 posts - 1 through 15 (of 69 total)
1 2 3 4 5 →
  • Author
    Posts
  • May 15, 2010 at 9:14 am #1204
    amin007
    Participant

    A shopping cart plugin or a membership plugin will exhibit strange behavior if PHP session on your server is not working correctly. It is your hosting provider’s duty to give you a correctly setup server where PHP session is working properly. Sometimes the session problem can come from a bad plugin that you may have installed on your site.

    This post will help you pinpoint the source of the PHP session related issue (if you have one) so you can address it.

    How To Find Out If You Are Having a PHP Session Related Issue

    This simple test should help you identify if you are having PHP Session issue on your server.

    Step 0: Make sure to empty the cache and deactivate any caching plugin before you do this test.

    Step 1: Add a product to the shopping cart (Check to make sure that the item is in the cart)

    Step 2: Now browse to a different page on your site (any page will do).

    Step 3: Go back to the page where you have your shopping cart that shows you the items in your cart. Can you see still the item that you added in step 1?

    If you can see the item in the cart after step 3 then your PHP Session is most likely working fine.

    If you cannot see the item the cart after step 3 then that means your PHP Session is not storing the data like it is supposed to. The PHP session is losing the value when you do another operation (step 2 in this case).

    How to Solve The Issue

    The following plugin can be a quick fix on some sites where the PHP session functionality is broken:

    WordPress Native PHP Sessions

    If this plugin doesn’t solve the issue then it needs to be investigated further.

    Once you identify that your site is showing the above mentioned PHP Session problem, you need to find out the source. The following checklist should help with that:

    Preparation

    Turn off any caching plugin (if you have one) while you do the following checks.

    1. Issue related to PHP session setup

    Occasionally a server may not have it’s PHP session configured correctly. Please note that you won’t be able to use a shopping cart software without the PHP session working correctly. It is your hosting provider’s responsibility to give you a server where the PHP session is setup properly. Contacting your hosting provider and requesting them to fix it is a good idea.

    Making the PHP session to work is not very hard. You mainly have to make sure the following two things are in place:

    1) Check if your server’s PHP config is set to allow sessions.

    2) Check to make sure the session save path has been configured correctly. This is just a matter of adding a line similar to the following in the php.ini file:

    session.save_path = /tmp

    It is best to contact your hosting provider so they can do this for you. All you have to do is request them to fix the PHP session issue on your server and they should know what to do.

    2. Issue related to using a bad plugin that is messing up the PHP session

    There are a few plugins out there that are not coded correctly and messes up the PHP session on your site when they are installed. I have seen a few plugins that creates a new PHP session without checking for an existing one first which can cause this issue. Do the following test to identify if you have a bad plugin like this so you can delete that plugin:

    Test to (How to) Identify a Conflicting Theme or Plugin

    3. Issue related to incorrect server setup

    Please check this article that explains how this issue can come from incorrect server setup (check the 2nd point):

    "Your shopping cart is empty" Upon Checkout

    Resources

    The following topics are good examples of how other users (who faced this issue) fixed the issue:

    eStore – Shopping cart not keeping track of items

    eStore plugin breaks site – PHP Session error

    PHP errors showing up on my blog pages

    PHP Session Error? But PHP confirmed working!

    Product not appearing in cart (bluehost)

    https://wordpress.org/support/topic/the-loopback-request-to-your-site-failed-4/page/2/#post-10662220

    Find Out Which WordPress Web Hosting Company Offers the Cheapest and Reliable Web Hosting Solution

    October 5, 2010 at 3:37 pm #20524
    cross
    Member

    This is concerning WP eStore, installed with WordPress 3.0.1.

    I am getting the “Either your shopping cart is empty or the PHP Session on your server is not working correctly.” error page when attempting to checkout with PayPal. This ONLY happens in FireFox when following these steps:

    1. Adding an item to cart

    2. Emptying the cart or deleting the item from cart

    3. Adding another item to cart

    4. Clicking on the Checkout with PayPal button

    I have tried the same sequence of steps in IE, and there are no errors — I get sent to the PayPal checkout page just fine.

    URL of pricing/order page:

    [http://www.thecreativecafe.net/pricing/]

    Thank you for your assistance!

    October 5, 2010 at 8:28 pm #20525
    wzp
    Moderator

    Using Firefox 3.5.5

    1. Added “Silver” package.

    2. Deleted item from cart.

    3. Added “Blue” package.

    4. Click on the Checkout with PayPal button.

    Got the …please wait… screen.

    Got “non-enhanced” PayPal checkout screen.

    1. Added “Gold” package.

    2. Emptied cart.

    3. Added “Silver” package.

    4. Click on the Checkout with PayPal button.

    Got the …please wait… screen.

    Got “enhanced” PayPal checkout screen.

    Are you using a hosting provider, or using your own server? What version of PHP is the server running?

    October 6, 2010 at 12:49 am #20526
    amin007
    Participant

    You seem to have made some modifications to the plugin which broke it. Did you try it with a fresh unmodified version just to see the difference?

    https://support.tipsandtricks-hq.com/forums/topic/re-install-or-load-a-fresh-build-of-the-plugins

    October 29, 2010 at 11:24 pm #20527
    Jakey
    Member

    Are there issues with the eStore plugin and FF 3.6.12?

    I’m getting the message “Either your shopping cart is empty or the PHP Session on your server is not working correctly. Please check this article”, only in FF.

    I don’t get that message in Chrome, Opera or IE.

    Thanks!

    Jake

    October 30, 2010 at 12:44 am #20528
    Jakey
    Member

    I just checked and it works in Safari too.

    The strange thing is that it has worked fine in Firefox for the last couple months..

    Really weird.

    October 30, 2010 at 9:18 am #20529
    amin007
    Participant

    Please post a link to the page.

    October 30, 2010 at 4:26 pm #20530
    Jakey
    Member

    Hi, Turned out a hosting problem. My host fixed it up and now everything is working fine.

    Sorry for wasting your time.

    Thank You,

    Jake

    November 4, 2010 at 11:30 pm #20531
    iinet
    Member

    I am getting this same error only in Firefox 3.6? Please help. I’m trying to get ready for a launch. Thanks!

    ERROR

    Either your shopping cart is empty or the PHP Session on your server is not working correctly. Please check this article

    November 5, 2010 at 4:22 am #20532
    amin007
    Participant

    Lets try the following option and see how it goes:

    Go to eStore Settings -> Advanced Settings menu and then check the following option and save it:

    Enable Alternate Redirection Method

    Now, do a checkout and let me know how you go.

    November 8, 2010 at 1:35 am #20533
    David Kakon
    Member

    I get this:

    Either your shopping cart is empty or the PHP Session on your server is not working correctly. Please check this article

    November 9, 2010 at 12:17 am #20534
    amin007
    Participant

    I will send you an email to get site access to check this out.

    November 10, 2010 at 4:42 am #20535
    amin007
    Participant

    Turned out that you had an incorrect server setup explained here (check the 2nd point):

    https://support.tipsandtricks-hq.com/forums/topic/paypal-says-your-shopping-cart-is-empty

    December 22, 2010 at 10:58 pm #20536
    otherrecords
    Member

    I’ve setup eStore and have been using Sandbox for testing.

    But now, I’m getting this error when I try to proceed with Check Out to PayPal.

    “Either your shopping cart is empty or the PHP Session on your server is not working correctly. Please check this article

    https://support.tipsandtricks-hq.com/forums/topic/php-session-not-working-correctly

    December 23, 2010 at 12:05 am #20537
    wpCommerce
    Moderator

    Can you please post a link to the page where I can test the checkout?

  • Author
    Posts
Viewing 15 posts - 1 through 15 (of 69 total)
1 2 3 4 5 →
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • WP PDF Stamper Documentation
  • WP Photo Seller Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial
  • WP Photo Seller Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2023 | Tips and Tricks HQ