Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19126 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86717 invoked by uid 1010); 22 Sep 2005 14:37:42 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 86701 invoked from network); 22 Sep 2005 14:37:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Sep 2005 14:37:42 -0000 X-Host-Fingerprint: 204.11.219.139 lerdorf.com Linux 2.4/2.6 Received: from ([204.11.219.139:56637] helo=colo.lerdorf.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 61/13-24510-3B1C2334 for ; Thu, 22 Sep 2005 10:37:39 -0400 Received: from [192.168.200.106] (c-24-6-5-134.hsd1.ca.comcast.net [24.6.5.134]) (authenticated bits=0) by colo.lerdorf.com (8.13.4/8.13.4/Debian-4) with ESMTP id j8MEbYXm016176 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 22 Sep 2005 07:37:35 -0700 Message-ID: <4332C1AD.8060204@lerdorf.com> Date: Thu, 22 Sep 2005 07:37:33 -0700 User-Agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Fredrik Olsson CC: internals@lists.php.net References: In-Reply-To: X-Enigmail-Version: 0.92.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Building extension for Mac OS X From: rasmus@lerdorf.com (Rasmus Lerdorf) 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