php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #890 Linking PHP into Apache fails
Submitted: 1998-11-01 18:27 UTC Modified: 1998-11-02 04:27 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: fate at frankfurt dot netsurf dot de Assigned:
Status: Closed Package: Compile Failure
PHP Version: 3.0.5 OS: Linux Kernel 2.0.35
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: fate at frankfurt dot netsurf dot de
New email:
PHP Version: OS:

 

 [1998-11-01 18:27 UTC] fate at frankfurt dot netsurf dot de
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-11-02 04:27 UTC] rasmus
You went slightly nuts with your Apache configure options there.  Get rid of the --enable-shared=max and you should be ok.  If you really do want to run with everything shared then you have to configure PHP using the shared-apache option instead of --with-apache, but I would reccomend just getting rid of the shared=max option.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 09 13:01:33 2024 UTC