Page 1 of 1

Compiling modules -- SOLVED

Posted: Sun May 27, 2007 4:51 am
by brighama
Hi there,
I'm trying to compile a custom helloworld-type extension, but I can't seem to get the thing to compile wth debug and multi-thread options. Here is what I'm doing:

cd to php-5.2.1/ext/hello
phpize
./configure --enable-debug --enable-multi-thread
gmake clean
gmake
cp modules/hello.so /usr/lib64/php/modules/


...but when I restart apache I get the following in my error logs:

Warning: PHP Startup: hello: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=1, thread-safety=1
These options need to match

What the heck am I doing wrong?
Thanks for any help!

Posted: Sun May 27, 2007 12:05 pm
by brighama
SOLVED:

The 'config' command just needed the location of the 'php-config' script, which provided all the correct settings (and was in a non-standard location.)

New config command:
./config --with-php-config=location/of/php-config