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 8 years, 10 months ago by wzp.
-
AuthorPosts
-
February 25, 2013 at 1:36 am #20583August 18, 2015 at 7:06 pm #20584RaySmerlinMember
Here’s something that may help with this issue.
I, too, after installing, got the “If you are the admin of this site and you are certain that the shopping cart is not empty then the PHP Session on your server is not working correctly” error. But, funny thing, after trying the first 3 steps, the cart contents were still there.
Stumbled upon the solution.
I have a domain magicdinnerbourbon.com that is parked at raysmerlin.com. Using the parked domain addresses. That’s where it was broken. If I use the primary domain, it works.
Food for thought.
August 18, 2015 at 9:42 pm #20585wzpModeratorWithout going into too much brain-scrambling detail; it has to do with the server’s session handler, allowing sessions from multiple domains on the same server, to bleed-through into each other. Sometimes this is due to a poorly written session handler, and sometimes the session handler deliberately allows this to happen.
January 12, 2016 at 1:20 am #20586jeremyers1MemberI am having a similar problem as stated on this thread.
I checked plugin and theme conflicts. There was no problem. I still got the error with no plugins and the default WP theme.
I am able to do the following:
1. Add items to cart.
2. Navigate to other pages (items stay in cart).
3. Check out and purchase items from PayPal.
4. Get sent back to Thank you page with the [wp_eStore_display_transaction_result] working properly.
HOWEVER, if after all this, I go back to my checkout page, my cart still has the items in them that I just purchased. My cart does not get emptied upon checking out.
Here is the error I get in my WordPress error.log. It shows up a couple times per hour.
[12-Jan-2016 01:01:40 UTC] PHP Warning: session_start(): open(/tmp/sess_06f8781253ecbdd5a0c41d4b2637be02, O_RDWR) failed: Permission denied (13) in /home/redee6464/public_html/wp-content/plugins/wp-cart-for-digital-products/wp_eStore1.php on line 4
I have had my hosting company check and doublecheck the php session settings. They say they are all working fine. They even installed some php files to check that PHP sessions were working properly.
These can be found here:
[https://redeeminggod.com/sessiontest1.php]
[https://redeeminggod.com/sessiontest2.php]
Any idea what is going on?
January 12, 2016 at 1:29 am #20587adminKeymasterThe following error means that the WordPress plugin is not given access to start the session. This can only be fixed by your hosting provider so WordPress plugins can write to the PHP Session.
PHP Warning: session_start(): open(/tmp/sess_06f8781253ecbdd5a0c41d4b2637be02, O_RDWR) failed: Permission denied
Ask them why is the server denying permission when the plugin calls the “session_start()” function?
Have a read through the previous posts in this topic and you will see many examples of 1st level of hosting support saying, “all is okay” but later they fixed it by applying the correct configuration.
Who is your hosting provider?
January 13, 2016 at 12:51 am #20588jeremyers1MemberIt’s Knownhost. I’ll ask them again.
My /tmp directory is set to 755. Does it need 777?
January 13, 2016 at 1:39 am #20589adminKeymaster755 permission is good. I think your hosting is using a different PHP handler which is not allowing the application access to that session file. This issue is definitely on your hosting side of things so keep looking there to see what else you can find.
January 14, 2016 at 12:31 am #20590jeremyers1MemberWe got it figured out.
I will post the solution here for anyone else who might have this difficulty.
As it turned out, I used to have my website at “www.example1.com” Earlier this year, I migrated it to “www.example2.com” and set up 301 redirects for all the pages.
What was happening was that if a person visited a link somewhere on the internet to “www.example1.com,” the server would start a php session for this visit and create a file in the /tmp directory … but then the visitor would get forwarded to “www.example2.com” and once here, the original tmp file could not be accessed from the new website. So I got the php session error.
So all I had to do was go and disable any plugins on the old site that were creating php sessions. All the 301 redirects still work, and I now have no more errors.
January 14, 2016 at 12:45 am #20591wzpModeratorThank you for sharing the explanation.
-
AuthorPosts
- You must be logged in to reply to this topic.