Wamp PHP 7.3 + memcache cause inconsistent sessions
Posted by: nikolas (---.forthnet.gr)
Date: November 20, 2019 01:10PM

Hi,

i m having an issue since upgrading from 7.2.10 to 7.3.xx . In all of my applications, i use memcache as caching mechanism, and session storage. After upgrading from php 7.2.10 to 7.3.x i notice inconsistency in session and cached data, that are stored in memcache.
For instance a user logs in, after a couple of refreshes gets logged out, as if session was not found, or expired, and if you continue to refresh, you may find youself again logged in, as if the session was recovered, so on to forth.

I haven't been able to isolate the issue on local memcache server or on wamp, if i return to 7.2.10 sessions work as expected.

Options: ReplyQuote
Re: Wamp PHP 7.3 + memcache cause inconsistent sessions
Posted by: RiggsFolly (Moderator)
Date: November 20, 2019 01:37PM

Hi

As memcached extensions do not come with WAMPServer, how and from where did you source the PHP extensions?

Also are you using a 32bit or 64bit WAMPServer?

In fact it may be useful to know a bit more in general, can you answer Read and Answer before you ask a question all these questions please

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.1.9 32bit & 64bit)
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.16>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 1 time(s). Last edit at 11/20/2019 01:38PM by RiggsFolly.

Options: ReplyQuote
Re: Wamp PHP 7.3 + memcache cause inconsistent sessions
Posted by: nikolas (---.forthnet.gr)
Date: November 20, 2019 01:47PM

1) Operatin system Windows 10 x64
2) WampServer x64 3.1.9
3) Apache 2.4.35
4) PHP 7.2.10 (no problem), 7.3.11 (problem in memcache) 7.3.12 (problem in memcache)


Memcache was downloaded from this source [github.com] (same on PHP 7.2.10 etc..)
Also i have used different builds of memcache server, 1.2.6 till now, and since the problem occured i tried also 1.5.x

Issue has been described here as well [github.com] , however, according to nono303 the issue doesn't seem to be related with memcache build.

On php.in i have the following configuration

[Memcache]
memcache.allow_failover = 1
memcache.max_failover_attempts=20
memcache.default_port = 11211
memcache.chunk_size = 32768
memcache.session_redundancy = 2


also played around with

memcache.hash_strategy = standard
memcache.hash_function = crc32
memcache.protocol = ascii
memcache.compress_threshold = 20000
memcache.lock_timeout = 1

but no result

Options: ReplyQuote
Re: Wamp PHP 7.3 + memcache cause inconsistent sessions
Posted by: Otomatic (Moderator)
Date: November 20, 2019 01:52PM

Hi,

To be seen with PHP support.

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.0 32 bit - Apache 2.4.41 - PHP 7.4.0/7.3.12/..../5.6.40 - MySQL 5.7.28 - MariaDB 10.4.11
Wampserver 3.2.0 64 bit - Apache 2.4.41 - PHP 7.4.0/7.3.12/..../5.6.40 - MySQL 5.7.28/8.0.18 - MariaDB 10.4.11
PhPMyadmin 4.9.2 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: Wamp PHP 7.3 + memcache cause inconsistent sessions
Posted by: nikolas (---.forthnet.gr)
Date: November 20, 2019 03:19PM

You reckon that the problem may lie in the wamp environment after all?

Options: ReplyQuote
Re: Wamp PHP 7.3 + memcache cause inconsistent sessions
Posted by: Otomatic (Moderator)
Date: November 20, 2019 04:53PM

Hi,

Wampserver, in itself, has absolutely nothing to do with your problem.

It works with one version of PHP, but not with the following ones; we necessarily deduce from this that the product is not compatible with PHP evolutions.

Memcache is not part of the Wampserver package, so it is to do with the memcache provider.

In addition, on the link you are quoting, it says "NTS", i. e. No Thread Safe, whereas for Windows, PHP is necessarily TS, i. e. Thread Safe; it is therefore essential that all extensions added to PHP are also TS.

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.0 32 bit - Apache 2.4.41 - PHP 7.4.0/7.3.12/..../5.6.40 - MySQL 5.7.28 - MariaDB 10.4.11
Wampserver 3.2.0 64 bit - Apache 2.4.41 - PHP 7.4.0/7.3.12/..../5.6.40 - MySQL 5.7.28/8.0.18 - MariaDB 10.4.11
PhPMyadmin 4.9.2 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: Wamp PHP 7.3 + memcache cause inconsistent sessions
Posted by: nikolas (---.4.246.239.dsl.dyn.forthnet.gr)
Date: November 20, 2019 08:09PM

On the link that I provided, there is also Thread Safe version of memcache, which is the one that I ve used.
I haven t traced any reports indicating cache/session inconsistency with php 7.3 on lamp environments, so I thought to ask over here as well, if it could be related to wampserver / php build.
As you may have noticed, I already opened thread, both on pecl php extension community over github, and on the github community where they provide windows builds of pecl php memcache extension.

Options: ReplyQuote
Re: Wamp PHP 7.3 + memcache cause inconsistent sessions
Posted by: RiggsFolly (Moderator)
Date: November 20, 2019 08:33PM

Ok, but one point, WAMPServer is not a LAMP environment its a WAMP environment

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.1.9 32bit & 64bit)
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.16>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Wamp PHP 7.3 + memcache cause inconsistent sessions
Posted by: nikolas (---.forthnet.gr)
Date: November 21, 2019 10:14AM

Thank you for the response.
You are right, they are different environments.
I don't know if i was misunderstood, i've been using wamp flawlessly throughtout the years, i just thought it may be usefull to report my findings regarding upgrading from php 7.2 to php 7.3 and seek for help. Afterall there may be other members in the community that may have solved it by changing some configuration, or some other way.

Options: ReplyQuote


Sorry, only registered users may post in this forum.