Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19143 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78739 invoked by uid 1010); 23 Sep 2005 15:17:49 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 78724 invoked from network); 23 Sep 2005 15:17:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Sep 2005 15:17:49 -0000 X-Host-Fingerprint: 67.78.11.229 daleenterprise.com FreeBSD 4.7-5.2 (or MacOS X 10.2-10.3) (1) Received: from ([67.78.11.229:63921] helo=daleenterprise.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id D5/F7-24510-B9C14334 for ; Fri, 23 Sep 2005 11:17:47 -0400 Received: from localhost (localhost [127.0.0.1]) by daleenterprise.com (Postfix) with ESMTP id ACF99D963AB; Fri, 23 Sep 2005 11:17:43 -0400 (EDT) Received: from daleenterprise.com ([127.0.0.1]) by localhost (daleenterprise.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 29387-07; Fri, 23 Sep 2005 11:17:42 -0400 (EDT) Received: from [10.1.100.20] (relay.mustangrestomods.com [67.78.11.226]) by daleenterprise.com (Postfix) with ESMTP id 90EE0D9639D; Fri, 23 Sep 2005 11:17:42 -0400 (EDT) In-Reply-To: <4333A7FB.4090702@treyst.se> References: <4333A7FB.4090702@treyst.se> Mime-Version: 1.0 (Apple Message framework v734) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: <7CB689DE-2739-4D3A-9F4A-D6F7BE9A0819@daleenterprise.com> Cc: php dev Reply-To: php dev Content-Transfer-Encoding: 7bit Date: Fri, 23 Sep 2005 11:17:41 -0400 To: Fredrik Olsson X-Mailer: Apple Mail (2.734) MTA-Interface: amavisd-new-2.3.3 (20050822) at daleenterprise.com X-Spam-Scanned: using SpamAssassin 3.1.0 (2005-09-13) at daleenterprise.com X-Virus-Scanned: using Clamav 0.86.2 (2005-07-25) at daleenterprise.com Subject: Re: [PHP-DEV] Building extension for Mac OS X From: info@daleenterprise.com ("D. Walsh") On Sep 23, 2005, at 03:00 AM, Fredrik Olsson wrote: > Hi. > > As you replied to my e-mail I guess it is ok to do the same. Just a > shame that a possible solution will not remain in the list for > others to see :/. unfortunately the list doesn't tag the reply to so hitting reply goes to the sender. > D. Walsh skrev: > > >> >> On Sep 22, 2005, at 09:48 AM, Fredrik Olsson wrote: >> >> >>> I use the binary installation of PHP 5.0.4 from http:// >>> www.entropy.ch/software/macosx/php/ >>> >>> > > > >>> 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 >>> >> >> >> LDFLAGS="-L/usr/local/php -L/usr/local/php/lib" CPPFLAGS=-I/usr/ >> local/ php5/include /usr/local/php5/bin/phpize >> ./configure [options] LDFLAGS="-L/usr/local/php -L/usr/local/php/ >> lib" CPPFLAGS=-I/usr/local/php5/include >> make >> sudo make install >> >> > The first line does not work at all, so I tried it as > /usr/local/php5/bin/phpize LDFLAGS="-L/usr/local/php -L/usr/ > local/php/lib" CPPFLAGS=-I/usr/local/ php5/include > And then the rest. pushd /usr/local ln -shf php5 php popd /usr/local/php/bin/phpize LDFLAGS="-L/usr/local/php -L/usr/local/ php/lib" CPPFLAGS=-I/usr/local/php/include ./configure [options] LDFLAGS="-L/usr/local/php -L/usr/local/php/lib" CPPFLAGS=-I/usr/local/php/include make sudo make install > It then installs the resulting module in /usr/lib/php/extensions/no- > debug-non-zts-20020429/, and that is the extensions_path for my > php4 install. So I manually copied my hello.so to /usr/local/php5/ > lib/, and got wrong version number again. > I can not quite see why I should use /usr/local/php/ for LDFLAGS as > that path does not exist (The linker also warns about this). > So I tried this: > /usr/local/php5/bin/phpize LDFLAGS="-L/usr/local/php5 -L/usr/ > local/php5/lib" CPPFLAGS=-I/usr/local/php5/include > ./configure --enable-hello LDFLAGS="-L/usr/local/php5 -L/usr/ > local/php5/lib" CPPFLAGS=-I/usr/local/php5/include > make > sudo make install > It still tries to install in the php4-directory. So I again > manually copied the hello.so. Allas the error remains: > peylow$ /usr/local/php5/bin/php -r 'echo hello_world();'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 > > >> >> >> SEE: >> http://www.daleenterprise.com/info.php >> >> > I checked this page, as I thought it might be a problem with me > using a binary install from entopy, and you use this one. But I can > not find any way to download and install this one, am I missing > something? I do not use the entrophy PHP, I build from scratch. > >> -- Dale >> >> > > Regards > > -- > //Fredrik Olsson -- Dale