Building extension for Mac OS X

From: Date: Thu, 22 Sep 2005 13:48:07 +0000
Subject: Building extension for Mac OS X
Groups: php.internals 
Request: Send a blank email to internals+get-19124@lists.php.net to get a copy of this message
I use the binary installation of PHP 5.0.4 from http://www.entropy.ch/software/macosx/php/ And a tiny test case trying to introduce the module hello, with the function hello_world() that simply returns a string. Actually I have just used copy and paste from this tutorial http://tinyurl.com/cahsj At first I ran php -r 'echo hello_world();' With "Fatal error: Call to undefined function: hello_world() in Command line code on line 1" as result. I checked into it and reallies that the default php was php 4, so I tried: /usr/local/php5/bin/php -r 'echo hello_world();' To be sure. This yields a better result :) PHP Warning: PHP Startup: : Unable to initialize module Module compiled with module API=20020429, debug=0, thread-safety=0
PHP    compiled with module API=20041030, debug=0, thread-safety=0
These options need to match No problem, my guess is that #include "php.h" for some reason uses the php4 header file. How do I force phpize, ./configure, #include "php.h" etc, to use the installed php5 files (All residing under /usr/local/php5)? regards Fredrik Olsson

« previous php.internals (#19124) next »