Bug #890 Updated: Linking PHP into Apache fails
| From: | Bug Database | Date: | Mon, 02 Nov 1998 09:27:37 +0000 |
| Subject: | Bug #890 Updated: Linking PHP into Apache fails | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-2122@lists.php.net to get a copy of this message | ||
ID: 890
User Update by: fate@frankfurt.netsurf.de
Status: Closed
Bug Type: Compile Failure
Description: Linking PHP into Apache fails
I get an error message "No rule to make target
libmodphp3-so.a', needed by
libphp3.so'. Stop." while trying to compe PHP 3.0.5 into Apache 1.3.3 using the
APACI Method.
The system's running a libc5-Linux, kernel version 2.0.35, gcc v2.7.2.1, GNU make 3.76.1, GNU
ar 2.8.1.
In preparation for a suitable RPM archive (RedHat package manager) I've so far written a little
shell script which, as soon as it works, I'll use for the RPM. So far it doesn't work: it
fails when trying to compile Apache.
Here's how I configure/make PHP (assume root dir is Apache's dist dir and PHP is a subdir.
Ignore Mod_Perl.):
--8<--cut here--
# Run configure once so PHP doesn't complain
./configure --prefix=/usr
# Configure and install PHP into Apache dir
cd php-3.0.5
./configure --with-apache=.. --with-gd=/usr/include/gd --with-zlib=/usr \
--with-config-file-path=/usr/local/httpd --enable-safe-mode \
--enable-track-vars --enable-magic-quotes \
--enable-memory-limit
make install
--8<--cut here--
Runs fine so far. Now I configure and try to install Apache:
--8<--cut here--
# Configure Apache
cd <back-to-apache-dir>
./configure --prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --datadir=/usr/local/httpd \
--sysconfdir=/etc/httpd --mandir=/usr/man --logfiledir=/var/log --localstatedir=/var \
--libexecdir=/usr/libexec/apache --enable-module=most --enable-module=auth_anon \
--enable-module=status --enable-module=info --enable-module=auth_db \
--enable-module=auth_dbm --enable-module=digest --enable-module=cern_meta \
--enable-module=expires --enable-module=headers --enable-module=include \
--activate-module=src/modules/perl/libperl.a \
--activate-module=src/modules/php3/libphp3.a \
--enable-shared=max --enable-suexec --suexec-caller=wwwrun --suexec-userdir=.www \
--suexec-uidmin=100 --suexec-gidmin=100 --suexec-safepath="/bin:/usr/bin"
# Compile Apache and its modules
make
--8<--cut here--
FYI: configure outputs:
--8<--cut here--
Configuring for Apache, Version 1.3.3
+ activated perl module (modules/perl/libperl.a)
+ activated php3 module (modules/php3/libphp3.a)
Creating Makefile
Creating Configuration.apaci in src
+ enabling mod_so for DSO support
Creating Makefile in src
+ configured for Linux platform
+ setting C compiler to gcc
+ setting C pre-processor to gcc -E
+ checking for system header files
+ adding selected modules
o rewrite_module uses ConfigStart/End
enabling DBM support for mod_rewrite
o dbm_auth_module uses ConfigStart/End
o db_auth_module uses ConfigStart/End
using Berkeley-DB/1.x for mod_auth_db (-ldb)
o perl_module uses ConfigStart/End
+ mod_perl build type: DSO
+ id: mod_perl/1.16
+ id: Perl/5.00404 (linux) [perl]
+ setting up mod_perl build environment
+ adjusting Apache build environment
o php3_module uses ConfigStart/End
+ using -ldl for vendor DSO support
+ doing sanity check on compiler and options
Creating Makefile in src/support
Creating Makefile in src/main
Creating Makefile in src/ap
Creating Makefile in src/regex
Creating Makefile in src/os/unix
Creating Makefile in src/modules/standard
Creating Makefile in src/modules/proxy
Creating Makefile in src/modules/perl
Creating Makefile in src/modules/php3
--8<--cut here--
So everything fine so far. Now when I runs make:
--8<--cut here--
<=== src/modules/perl
===> src/modules/php3
gcc -c -I../../os/unix -I../../include -DLINUX=2 -DMOD_PERL -DUSE_HSREGEX
../../apaci -fpic -DSHARED_MODULE mod_php3.c && mv mod_php3.o mod_php3.so-o
make[4]: *** No rule to make target libmodphp3-so.a', needed by libphp3.so'.
Stop.
make[3]: *** [all] Error 1
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/usr/src/packages/BUILD/apache_1.3.3/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/usr/src/packages/BUILD/apache_1.3.3'
make: *** [build] Error 2
--8<--cut here--
Any idea? This occurs regardless whether I also enable MySQL support or not...
-------( Added 2.Nov.98 10:25 CET )--------
As PHP itself doesn't know a --shared-option I suppose you mean to include PHP3 using
--shared-module instead of --activate-module. This works fine.
Full Bug description available at: http://ca.php.net/bugs.php3?id=890
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net