#21 closed defect (invalid)
Apache start: xcache.so: undefined symbol: destroy_zend_function
| Reported by: | anonymous | Owned by: | moo |
|---|---|---|---|
| Priority: | major | Milestone: | 1.0.1 |
| Component: | cacher | Version: | 1.0 |
| Keywords: | Cc: | ||
| Application: | PHP Version: | ||
| Other Exts: | SAPI: | ||
| Probability: | Blocked By: | ||
| Blocking: |
Description (last modified by moo)
Hi,
I try to get
Apache 2.2.2 with PHP 5.1.4 to run. Without xcache it works.
Compiling xcache also works without complaints. But including
xcache into php.ini results in this error at apache startup:
Failed loading /usr/local/LAMP/php/5.1.4/lib/php/extensions/no-debug-non-zts-20050922/xcache.so: /usr/local/LAMP/php/5.1.4/lib/php/ext
ensions/no-debug-non-zts-20050922/xcache.so: undefined symbol: destroy_zend_function
my configuration of xcache:
- /usr/local/LAMP/php/5.1.4/bin/phpize --clean
- /usr/local/LAMP/php/5.1.4/bin/phpize
- ./configure --prefix=/usr/local/LAMP/xcache/1.0 \
--with-php-config=/usr/local/LAMP/php/5.1.4/bin/php-config \
--enable-xcache
Best regards,
Christian
Change History (19)
comment:1 Changed 7 years ago by moo
- Description modified (diff)
comment:2 Changed 7 years ago by moo
what's your os distro/version?
i can see destroy_zend_function defined in your libphp5.so (fine), which is UNDEF in xcache.so (expected), by using objdump -x
comment:3 Changed 7 years ago by moo
quote info from the reporter's mail
Here more infos:
libphp5.so is loaded from:
/usr/local/LAMP/apache/2.2.2/modules
When it is not there, apache does not start.
xcache.so is loaded from the directory:
/usr/local/LAMP/php/5.1.4/lib/php/extensions/no-debug-non-zts-20050922
There is no libphp5.so under /usr/local/LAMP/php/...
There are only 3 libphp5.so on my system, one in the
Apache dir and 2 in the php-source dir. They are all the same.
Here is my apache-conf:
./configure --prefix=/usr/local/LAMP/apache/2.2.2 \
--datadir=/usr/local/LAMP/apache/www \
--enable-modules=all \
--enable-shared=max \
--enable-so \
--sysconfdir=/usr/local/LAMP/apache/conf \
--enable-ssl \
--enable-deflate \
--with-ssl=/usr/local/LAMP/openssl/0.9.8b
Here is my php-conf:
./configure --prefix=/usr/local/LAMP/php/5.1.4 \
--with-mysql=/usr/local/LAMP/mysql/5.0.22 \
--with-mysql-sock=/tmp/mysql.sock \
--enable-gd \
--with-gd \
--with-apxs2=/usr/local/LAMP/apache/2.2.2/bin/apxs \
--enable-discard-path \
--enable-force-redirect \
--with-zlib-dir=/lib \
--with-freetype-dir=/usr/lib \
--with-ttf \
--enable-gd-native-ttf \
--enable-versioning \
--enable-track-vars=yes \
--enable-sysvshm=yes \
--enable-sysvsem=yes \
--enable-ftp \
--enable-mbstring \
--with-config-file-path=/etc
comment:4 Changed 7 years ago by anonymous
System is an actual gentoo 32 bit, gcc 4.1.1 and kernel 2.6.16.19.
In php-script a dl('xcache.so'); returns:
Warning: dl(): Unable to load dynamic library './xcache.so' - ./xcache.so: undefined symbol: destroy_zend_function in index.php on line 2
BUT, running /usr/local/LAMP/php/5.1.4/bin/php -v returns THIS:
PHP 5.1.4 (cli) (built: Jul 20 2006 14:29:27)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
with XCache v1.0, Copyright (c) 2005-2006, by mOo
comment:5 Changed 7 years ago by anonymous
Just for clarification: the dl('xcache.so'); was just another test, for sure, xcache.so is included as zend_extension in php.ini.
comment:6 Changed 7 years ago by moo
if u're building php by yourself, try to
$ cd php-src $ mv ../xcache ext/ $ ./cvsclean $ ./buildconf --force (XCache as builtin module) $ ./configure --....youconfig here... --enable-xcache=yes (or u could try XCache as xcache.so, the shared module, if u want) $ ./configure --....youconfig here... --enable-xcache=shared
that's a quick workaround i can think of.
comment:7 Changed 7 years ago by moo
- if u're gonna retry standalone build
and gimme your make.log.bz2
(after phpize+configure) $ make clean xcachesvnclean $ make 2>&1 | tee make.log $ bzip2 make.log
- to make sure u're not mixing up the files:
$ su # updatedb # exit $ locate xcache.so $ locate libphp5.so
- u shouldn't use dl('xcache.so') if xcache.so is loaded as zend_extension.
comment:8 Changed 7 years ago by anonymous
Aha, xcache as builtin-module works!
Thank you for this trick!!!
But it was for sure very nice if xcache would
also work with the usual installation procedure.
comment:9 Changed 7 years ago by anonymous
And trying to install xcache as shared module (--enable-xcache=shared)
gives in Apache error.log at startup:
/usr/local/LAMP/php/5.1.4/lib/php/extensions/no-debug-non-zts-20050922/xcache.so doesn't appear to be a valid Zend extension.
comment:10 Changed 7 years ago by judas_iscariote
remove --enable-versioning ..again DO NOT USE THAT ¡¡ it causes a lot of trouble and AFAIK it will be removed due to the same reason.
for the reasons, please do a search in the PHP bugtracker and the @internals mail list.
comment:11 Changed 7 years ago by anonymous
I already removed --enable-versioning because when you try to compile
with --enable-xcache=shared, the configure-script says that it conflicts
with --enable-versioning because xcache.so will be a module. So I removed
--enable-versioning.
comment:12 Changed 7 years ago by moo
thanks for the tips judas_iscariote, let's put it up in wiki.
can u pls remove --enable-versioning for php build? not just xcache build, and see if it works.
comment:13 Changed 7 years ago by moo
pls try to load xcache.so as a normal php extension beside a zend extension.
comment:14 Changed 7 years ago by anonymous
Look at this!
Having removed --enable-versioning and now xcache also runs as module!!!
comment:15 Changed 7 years ago by judas_iscariote
of course that would work, Im telling you so :P
Patient : "xcache doesn't work with --enable-versioning"..
Doctor : "Dont do that then" ;-)
comment:16 Changed 7 years ago by anonymous
It was not that obvious:
1) PHP was compiled with --enable-versioning
2) xcache compiled fine as module with --enable-versioning, but did not work then
as Apache-Module, but xcache worked when you execute ./php an the console.
3) Then by suggestion of moo, I included xcache in PHP-source-directory
to be build statically with PHP
4) Then this static build conflicted with --enable-versioning
comment:17 Changed 7 years ago by moo
- Resolution set to invalid
- Status changed from new to closed
it has nothing to do with XCache but a bug (or feature request) in php.
what do u mean by "Then this static build conflicted with --enable-versioning"? when the xcache is built into php as a static module, you're free to or not to use --enable-versioning.
feel free to tell me if there's any workarround that i can tune XCache work out this problem. marked as invalid until then.
comment:18 Changed 7 years ago by anonymous
So, when you compile php with --enable versioning you can later on
compile xcache successfully. But the problem is that xcache does
not get loaded in Apache. Apache runs with php then but without xcache
with this error in error.log
Error: Failed Loading /usr/local/LAMP/php/5.1.4/lib/php/extensions/no-debug-non-zts-20050922/xcache.so: /usr/local/LAMP/php/5.1.4/lib/php/ext ensions/no-debug-non-zts-20050922/xcache.so: undefined symbol: destroy_zend_function
When you put xcache source into the php-source-directory to build xcache
statically with php, then you will only be able to do this without --enable-versioning because when you do ./configure... it exits with error, that --enable-
versioning cannot be used with the xcache module.
I don't need enable versioning, it was in my configure by chance, it is removed
now and I am happy now.
As a workaround I would quote in manual NOT to use --enable-versioning as suggested
here in other posts in this bug-report.
comment:19 Changed 7 years ago by moo
FIY: i haven't yet find the discussion about this problem, can u pls point me to it, judas_iscariote? i can't find how enable-versioning is affecting the build either by reading the configure.in acinclude.m4 etc (gonna read webcvs but it's like a beast). but there WAS problem listed in php4/NEWS that mod_php4-apache had problem compileing with versioning enabled, and is listed in php-src/TODO-PHP5 as Component: Redesign of API Versioning
i'm somehow interested in this problem which is why i mark this bug as invalid not "wontfix".


it should be there exported from php. can u attach your xcache build directory here?