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/
<snip>
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
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php