Forum Replies Created
-
AuthorPosts
-
October 24, 2019 at 11:39 pm in reply to: eStore – problems with sessions and headers after site migration to a new server #80008Rex YulMember
For what is worth,
I noticed the error happens on PHP 7.2 (and 7.3), but not on PHP 5.6
I downgraded to PHP 5.6 and the error wasn’t being logged by my security plugin. But as soon as I went up to PHP 7.2, the error started being logged again.
This is likely due to how PHP 7.x handles the sessions, according to the error logs. When there’s a chunk of code that’s processing sessions earlier and a later piece of code tries to execute that, it usually results in a bad time, with errors.
Can you try to reproduce this on your services?
Thanks!
P.S I have made my host to recompile PHP 7.2 several times, and the error is still being logged by my security plugin
October 23, 2019 at 8:44 pm in reply to: eStore – problems with sessions and headers after site migration to a new server #80007Rex YulMemberHi,
How about the PHP closing tag?
Or,
shouldn’t you use “===” instead of “==” when using Sessions?
Take a look at this:
October 18, 2019 at 12:39 am in reply to: eStore – problems with sessions and headers after site migration to a new server #80005Rex YulMemberHi,
Take a look at this link:
https://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php
Apparently, PHP SESSIONS are very sensitive to white spaces (and other stuff)
I have been carefully examining the file wp_eStore1.php
And I have noticed this:
1. There is a white space right between the opening “<?php” tag and “if (version_compare(PHP_VERSION, ‘5.4.0’) >= 0) {“
2. I think there’s a missing php closing tag “?>” at the end of the file
Couldn’t be possible that the error is because of this whitespace or missing closing tag?
Maybe the PHP server of Cpanel bypass this whitespace, but the PHP server of DirectAdmin is not so permissive (it actually logs the whitespace as an error).
Maybe we can try see if this whitespace is triggering the problem with the session start and headers sent early.
It would also be good to see if there’s a missing php closing tag at the end of the file.
Just my two cents.
Thanks!
October 17, 2019 at 6:54 pm in reply to: eStore – problems with sessions and headers after site migration to a new server #80003Rex YulMemberHi,
I followed the two steps you recommend. First, I deactivated and erased WP ESTORE. Then, I installed it again from the plugins page. This didn’t solve the problem.
Then. I deactivated all plugins and started to try to pinpoint one that could be conflicting. The error continue showing no matter what.
In any case, I think is odd that another plugin is conflicting with WP ESTORE, because in the old server none of the plugins conflicted with it (and the plugins are the same in both servers). Why would they start to conflict in the new server?
It could be a server configuration issue. But my host tells me the configuration on my old server is exactly the same that in the new server.
So I’m kind of lost here.
Any more ideas what could be the issue?
My host said this to me:
“The PHP handler in your source server is LSAPI which is not available on Directadmin without using LiteSpeed so I’ve set Directadmin to use PHP-FPM instead.”
Could that PHP-FPM be the culprit?
Also,
The database names changed during the migration. I don’t know if this could be responsible.
Thanks for the help!
-
AuthorPosts