Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19124 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69433 invoked by uid 1010); 22 Sep 2005 14:00:43 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 69417 invoked from network); 22 Sep 2005 14:00:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Sep 2005 14:00:43 -0000 Received: from ([127.0.0.1:8521]) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with ECSTREAM id 9B/F0-24510-909B2334 for ; Thu, 22 Sep 2005 10:00:41 -0400 X-Host-Fingerprint: 212.31.188.19 unknown Received: from ([212.31.188.19:25557] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id ED/6F-24510-B16B2334 for ; Thu, 22 Sep 2005 09:48:11 -0400 Message-ID: To: internals@lists.php.net Date: Thu, 22 Sep 2005 15:48:07 +0200 User-Agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716) X-Accept-Language: sv, en-us, en MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 212.31.188.19 Subject: Building extension for Mac OS X From: fredrik.olsson@treyst.se (Fredrik Olsson) 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