I cannot seem to convince the "hello world" extension I am writing to
use the same PHP API version, debug, and ZTS mode as my PHP CLI.
../../sapi/cli/php -d extension_dir="." -r "dl('modules/perror.so');
echo hello_world();"
Warning: dl(): *8i(T7i(: Unable to initialize module
Module compiled with module API=20041030, debug=0, thread-safety=0
PHP compiled with module API=20050922, debug=1, thread-safety=1
These options need to match
in Command line code on line 1
API=20050922, debug=1, thread-safety=1 is what I would expect to see
for both, as the source tree I am using is from CVS -r PHP_5_1
I saw one post that 'dl' was deprecated and to just use extension= in
php.ini, so I've done it with -d extension=modules/perror.so and no
'dl and it's the same output.
I've been dinking with this for a couple hours, and the Google answers
are always "Use the same settings for ./configure for all
compilations"
Problem is, the configure lines I am using are the same, and I'm even
TELLING it to use the includedir/libdir I want.
>From my extension directory:
-bash-2.05b$ cat ~/cvs/php-src/config.safe
#! /bin/sh
./configure --enable-debug --enable-maintainer-zts
--prefix=/www/acousticdemo.com/cvs/usr/local $@
[I set up a shell script so I wouldn't have to re-type it each time.]
-bash-2.05b$ cat config.nice
#! /bin/sh
#
# Created by configure
'./configure' \
'--enable-debug' \
'--enable-maintainer-zts' \
'--enable-perror' \
'--prefix=/www/acousticdemo.com/cvs/usr/local/' \
'--includedir=/www/acousticdemo.com/cvs/usr/local/' \
'--libdir=/www/acousticdemo.com/cvs/usr/local/' \
"$@"
-bash-2.05b$
So that's what I ASKED the extension to compile as...
Okay, so I added --includedir and --libdir in an attempt for FORCE the
Module to look where I want it to. But it failed the same way without
them.
Yet, it persists in using what I believe are the headers from my
webhost installation in /usr/local/bin, which would be PHP 5.0.4
Is there any other magic incantation I can use to FORCE the extension
configure script to ignore /usr/local and use MY ~/cvs/usr/local
I feel like I've done everything "right" and yet it ignores what I ask
it to do in favor of /usr/local, which is what I expressly do not
want.
I have had to comment out a couple "exit" lines in
../../usr/local/bin/phpize in the autoconf stuff, because I set
$PHP_AUTOCONF and $PHP_AUTOHEADER for /usr/local/bin/autoconf213
FreeBSD style, and those tests seem bogus, but I really doubt that is
the cause of this particular problem... Is it?
How do you guys handle having multiple installs/versions.
Surely you guys don't wipe out your base /usr/local every time... Do you?
Maybe this matters?
FreeBSD o11.hostbaby.com 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Sat Jan
15 06:47:43 PST 2005
God I hope I'm not doing something colossally stupid. Again.
--
Like Music?
http://l-i-e.com/artists.htm
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php