php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #71640 Fail to load module memcached, bug of module dependence in dynamic loading
Submitted: 2016-02-22 02:33 UTC Modified: 2021-03-09 14:07 UTC
Votes:18
Avg. Score:4.2 ± 0.9
Reproduced:17 of 17 (100.0%)
Same Version:10 (58.8%)
Same OS:10 (58.8%)
From: gehuangyi20 at hotmail dot com Assigned:
Status: Verified Package: memcached (PECL)
PHP Version: 5.6.18 OS: ubuntu 14.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
16 + 20 = ?
Subscribe to this entry?

 
 [2016-02-22 02:33 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-03-09 14:07 UTC] cmb@php.net
-Status: Open +Status: Verified -Type: Bug +Type: Documentation Problem
 [2021-03-09 14:07 UTC] cmb@php.net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 21:01:29 2024 UTC