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 Error? But PHP confirmed working!

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › PHP Session Error? But PHP confirmed working!

Tagged: php session error

  • This topic has 14 replies, 6 voices, and was last updated 13 years, 5 months ago by Wagsy.
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • August 4, 2011 at 8:51 am #3978
    frsn
    Member

    Hi,

    When I try to check out from my shop by clicking the Paypal button, I get the following message:

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

    I tried browsing to another page with an item in my cart, and it stayed there, so I know my PHP is working. I also tried implementing a fix recommended in another thread: change “define(‘WP_ESTORE_SAVE_SESSION_TO_COOKIE’, false);” to “define(‘WP_ESTORE_SAVE_SESSION_TO_COOKIE’, true);” but it’s still not working!

    Any idea what could be going wrong?

    FYI, when I go into the WordPress editor for “wp-cart-for-digital-products/wp_eStore1.php” WP tells me it is (inactive). Could this be the problem? If so, how do I fix it?

    Here’s my Shop page:

    [http://www.knightshillpublishing.com/?page_id=257]

    Thanks a million for any help!

    August 5, 2011 at 12:21 am #35146
    amin007
    Participant

    Your site is not setup correctly so its not resolving the domain name for the WordPress plugins URL constant. When you click the checkout button your site is going to the following URL?

    http://0338e98.netsolhost.com/blog1/wp-content/plugins/………..

    Take a look at the domain name.

    August 6, 2011 at 4:53 am #35147
    frsn
    Member

    Thank you for your reply! So do you think I messed up when I moved my wordpress to a new directory?

    Everything is supposed to be at [http://www.knightshillpublishing.com now] That other URL is the original one I got from my host.

    August 7, 2011 at 1:26 am #35148
    amin007
    Participant

    Your hosting provider should be able to look at this and help you but essentially you should never see things like the following in the URL when browsing live sites:

    http://0338e98.netsolhost.com/blog1/....

    Ask your hosting provider why the following address doesn’t resolve the domain name and shows the doming name there?

    http://0338e98.netsolhost.com/blog1/?p=328

    August 8, 2011 at 1:24 pm #35149
    frsn
    Member

    My hosting provider sucks. I found out that the error was that my .htaccess file was not overwriting the weird URL (original server URL) with my domain name. This helpful person on the internet gave the solution:

    [http://www.blog.web6.org/wordpress-permalinks-404/]

    Basically I pasted

    # BEGIN WordPress

    <IfModule mod_rewrite.c>

    ErrorDocument 404 /index.php?error=404

    RewriteEngine On

    RewriteBase /

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule . /index.php [L]

    </IfModule>

    # END WordPress

    into my .htaccess file instead of what was there. Now the shopping cart works and all my URLs are my domain name.

    Thank you so much for your help! I totally appreciate that you always provide support to your customers.

    November 3, 2011 at 12:09 am #35150
    Shelagh
    Member

    I have just installed eStore and the affiliate programme on my blog, and whilst it has taken all day, the videos made it all straightforward.

    I had to update the php verstion via the hosting company,to version 5, to update to WordPress 3.2.

    But now I’m getting the same problem as others, that the product does not add to the shopping cart.

    I’ve seen various fixes on here; what are the best things to try now (and be gentle, please – I have am very low techhie level.. Site is [www.spiritualmarketing-blog.com]

    and the store (just one product) [http://spiritualmarketing-blog.com/store/]

    November 3, 2011 at 12:42 am #35151
    Ivy
    Member

    @Shelagh, I tested the PHP session on your site and it is not working properly. Please see the following forum post as it will tell you how to test and fix this issue:

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

    November 3, 2011 at 6:16 am #35152
    Shelagh
    Member

    Thank you very much.The hosting company did indeed find a problem and now when I Add the product and go to Paypal, it works.

    But there are 2 shopping cart icons showing; one top left has a green tick and says Items in cart; one bottom right has a red cross and says shopping cart empty.

    If I add another item, it shows 2 items, updates the amount, but there is still this Cart emty icon on the right.

    It goes through to Payoal OK.

    Is this another hosting issue, or something I can fix?

    Shelagh

    November 3, 2011 at 8:30 am #35153
    Ivy
    Member

    The cart with the red x is to empty out (delete) the shopping cart. It does not mean the cart is empty. Your customers can use this if they have made a mistake and want to start over.

    November 3, 2011 at 9:02 am #35154
    Shelagh
    Member

    Duh! See how it works now!

    I’m so happy to have it working properly!

    December 23, 2011 at 11:24 pm #35155
    Wagsy
    Member

    Hello

    I seem to be having the same problem, hosting guy came back to me and said all is fine his end?

    [http://www.naturevideo.com.au/download-nature-videos/]

    Does is with three different browser and I cleared the cache too.

    Cheers

    Paul

    December 24, 2011 at 9:20 am #35156
    admin
    Keymaster

    I sent you an email to get site access so I can investigate more.

    December 24, 2011 at 10:11 am #35157
    Wagsy
    Member

    Cheers for that, sent you the details :-)

    December 24, 2011 at 2:07 pm #35158
    admin
    Keymaster

    For some reason when any script outside of WordPress is loaded, it doesn’t have the PHP session info anymore on your site (PHP session data is suppose to survive throughout any PHP script on the domain)

    I applied the following tweak and it seem to work on your site:

    Opened the “eStore_advanced_configs.php” file and searched for the following line of code:

    define('WP_ESTORE_SAVE_SESSION_TO_COOKIE', false);

    Then replaced it with the following:

    define('WP_ESTORE_SAVE_SESSION_TO_COOKIE', true);

    December 24, 2011 at 2:24 pm #35159
    Wagsy
    Member

    Thanks very much for looking into that.

    Yes it seems to be working now.

    Merry Xmas :-)

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

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • 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
  • 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

Our Other Plugins

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

Copyright © 2025 | Tips and Tricks HQ