Topic: php5.4.11 with memcache session

Hi everyone

I was wondering if someone help me out with an issue.  I just upgrade from php 5.3 (remi) to php 5.4.11 (remi).  Everything seems works but memcache sessions.   Basically when session start each time a page loads, the session id changes.  (works perfectly in 5.3)

after upgrade
php.x86_64                              5.4.11-1.el6.remi               @remi   
php-cli.x86_64                          5.4.11-1.el6.remi               @remi   
php-common.x86_64                       5.4.11-1.el6.remi               @remi   
php-devel.x86_64                        5.4.11-1.el6.remi               @remi   
php-imap.x86_64                         5.4.11-1.el6.remi               @remi   
php-mbstring.x86_64                     5.4.11-1.el6.remi               @remi   
php-mysql.x86_64                        5.4.11-1.el6.remi               @remi   
php-pdo.x86_64                          5.4.11-1.el6.remi               @remi   
php-pear.noarch                         1:1.9.4-12.el6.remi.1           @remi   
php-pecl-apc.x86_64                     3.1.14-1.el6.remi.1             @remi   
php-pecl-igbinary.x86_64                1.1.2-0.1.git3b8ab7e.el6.remi   @remi   
php-pecl-memcache.x86_64                3.0.7-5.el6.remi                @remi

I know I doing something stupid because when I did a NEW install for php 5.4.11 remi it works.  Where should I be looking to solve this issue?

Thanks for reading.
HW

Re: php5.4.11 with memcache session

Check how is configured your session handler/path

Previously it was in memcache.ini
Now it have moved to SAPI configuration file (so php.conf for apache)

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: php5.4.11 with memcache session

Remi,

Thanks for your suggestion, but I'm setting the session handler inside a Virtualhost

    php_value session.name "mySessionName"
    php_value session.save_handler "memcache"
    php_value session.save_path "tcp://172.16.2.100:11211"

Re: php5.4.11 with memcache session

Does phpinfo() reports the correct values ?

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: php5.4.11 with memcache session

Yes,

session_module_name() returns "memcache"
session_save_path() returns "tcp://172.16.2.100:11211"

from the webserver in question to memcache server via netcat

STAT pid 25987
STAT uptime 7336102
STAT time 1361471793
STAT version 1.4.15
STAT libevent 1.4.13-stable
STAT pointer_size 64
STAT rusage_user 3481.289763
STAT rusage_system 9924.881188
STAT curr_connections 17
STAT total_connections 28911130
STAT connection_structures 129
STAT reserved_fds 20
STAT cmd_get 32629283
STAT cmd_set 90342151
STAT cmd_flush 0
STAT cmd_touch 0
STAT get_hits 25775555
STAT get_misses 6853728
STAT delete_misses 10058
STAT delete_hits 7328
STAT incr_misses 8443691
STAT incr_hits 24074278
STAT decr_misses 0
STAT decr_hits 0
STAT cas_misses 0
STAT cas_hits 0
STAT cas_badval 0
STAT touch_hits 0
STAT touch_misses 0
STAT auth_cmds 0
STAT auth_errors 0
STAT bytes_read 8848770233
STAT bytes_written 4739074108
STAT limit_maxbytes 4294967296
STAT accepting_conns 1
STAT listen_disabled_num 0
STAT threads 4
STAT conn_yields 0
STAT hash_power_level 20
STAT hash_bytes 8388608
STAT hash_is_expanding 0
STAT bytes 20282613
STAT curr_items 89482
STAT total_items 90330231
STAT expired_unfetched 15029279
STAT evicted_unfetched 0
STAT evictions 0
STAT reclaimed 15378863
END

Just to be make sure I have my head straight that it connect to memcache machine and it being block via firewall.. haha.

I have upgrade another machine from php 5.3 to php 5.4 using remi, memcache worked perfected! sigh.. It driving me crazy.  And I know I'm doing something stupid.

Remi.. Thanks for helping.

Re: php5.4.11 with memcache session

Found!

Hahah.. it something stupid. 

session.name "stringName"

php 5.3 support the space character in stringName.
php 5.4 does not support space character in stringName.

Thanks Remi.

Re: php5.4.11 with memcache session

[resolved]