Bug->Doc #71640 [Opn->Ver]: Fail to load module memcached, bug of module dependence in dynamic loading

From: Date: Tue, 09 Mar 2021 14:07:29 +0000
Subject: Bug->Doc #71640 [Opn->Ver]: Fail to load module memcached, bug of module dependence in dynamic loading
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18628@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71640&edit=1

 ID:                 71640
 Updated by:         cmb@php.net
 Reported by:        gehuangyi20 at hotmail dot com
 Summary:            Fail to load module memcached, bug of module
                     dependence in dynamic loading
-Status:             Open
+Status:             Verified
-Type:               Bug
+Type:               Documentation Problem
 Package:            memcached
 Operating System:   ubuntu  14.04
 PHP Version:        5.6.18
 Block user comment: N
 Private report:     N

 New Comment:

Whenever an extension depends on another extension, the latter has
to be already loaded before the former is loaded.  This is not a
bug, but should better be documented for memcached which
apparently relies on several other extensions.


Previous Comments:
------------------------------------------------------------------------
[2016-02-22 02:33:23] gehuangyi20 at hotmail dot com

Description:
------------
I am using following php distribution.

https://launchpad.net/~ondrej/+archive/ubuntu/php

Both php 5.6.18 and php 7.0.3 are installed.
The memcached module is compiled with json, igbinary, msgpack, WDDX.
All dependent module are installed and dynamic loaded.

These two files are the configuration file of memcached and msgpack
/etc/php/5.6/cli/conf.d/20-memcached.ini
/etc/php/5.6/cli/conf.d/20-msgpack.ini

When I run php command, I receive a warning 

PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/lib/php/20131226/memcached.so' - /usr/lib/php/20131226/memcached.so: undefined
symbol: php_msgpack_serialize in Unknown on line 0

This warning does not appear in php 7.0. I checked the phpinfo page. memcached
is unloaded in php 5.6.18, but loaded in php 7.0. If I change the file name from
"20-memcached.ini" to "20-mzemcached.ini", the warning never appears, which
implies msgpack should be loaded before memcached. memcached is also loaded in phpinfo page. I find
memcached depends on msgpack. function
ZEND_MOD_REQUIRED("msgpack") is called. I think something happens unexpected while loading
the module. 


Test script:
---------------
php5.6 -m

Expected result:
----------------
[PHP Modules]
bcmath
calendar
Core
ctype
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
json
libxml
mbstring
mcrypt
mhash
msgpack
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pgsql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

Actual result:
--------------
PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/lib/php/20131226/memcached.so' - /usr/lib/php/20131226/memcached.so: undefined
symbol: php_msgpack_serialize in Unknown on line 0
[PHP Modules]
bcmath
calendar
Core
ctype
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
json
libxml
mbstring
mcrypt
mhash
msgpack
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pgsql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=71640&edit=1


Thread (1 message)

  • cmb@php.net
  • Unknown Message
    • cmb@php.net
« previous php.doc.bugs (#18628) next »