Problems compiling PHP

Fahrvergnuugen

I am the law!
I had php working before, but I wanted to recompile it with GD support. I decided that while I was at it, I might as well upgrade Apache too.

I followed the instructions from stepwise:
first built GD
http://www.stepwise.com/Articles/Workbench/2001-06-12.01.html
then apache and PHP
http://www.stepwise.com/Articles/Workbench/2001-10-11.01.html

Everything went smoothly until I got the make install step for PHP. It errors out when trying to:
[activating module `php4' in /etc/httpd/httpd.conf]
cp libs/libphp4.so /usr/libexec/httpd/libphp4.so
cp: cannot stat `libs/libphp4.so': No such file or directory

apxs:Break: Command failed with rc=1
make[1]: *** [install-sapi] Error 1
make: *** [install-recursive] Error 1

the libphp4.so file does not exist in the libs directory...I'm assuming it was supposed to be generated during the make step? I've tried it over and over and I can't get it to work, always the same problem.

I tried downloading the source from www.php.net rather than the source provided by stepwise, and then tried compiling with the same instructions.
This errored out with
/usr/bin/ld: -undefined error must be used when -twolevel_namespace is in effect
make[1]: *** [libphp4.la] Error 1
make: *** [all-recursive] Error 1

I received no errors when compiling and installing the jpeg, png and GD libraries.
In both cases I used
./configure --with-xml --with-zlib --with-apxs=/usr/sbin/apxs --with-gd --with-jpg --with-png

I found a precompiled libphp4.so binary on entropy.ch:
http://www.entropy.ch/software/macosx/php/#build
but this binary will not work with my upgraded version of apache.

So I either need to do one of two things:
1. Somehow restore my apache installation back to the default that came with 10.1

2. Figure out why PHP won't install per the instructions at stepwise

Am I just doing something really stupid? Anybody else have the same problem?
Any help or suggestions would be greatly appreciated.
 
Back
Top