Re: Building extension for Mac OS X

From: Date: Thu, 22 Sep 2005 14:37:33 +0000
Subject: Re: Building extension for Mac OS X
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-19126@lists.php.net to get a copy of this message
Fredrik Olsson wrote: > 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)? How about: /usr/local/php5/bin/phpize ? -Rasmus

« previous php.internals (#19126) next »