php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9036 Non installation of libphp.so
Submitted: 2001-01-31 14:28 UTC Modified: 2004-09-12 14:53 UTC
From: d dot drury at ucl dot ac dot uk Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.0.4pl1 OS: RedHat Linux
Private report: No CVE-ID: None
 [2001-01-31 14:28 UTC] d dot drury at ucl dot ac dot uk
Hi,
I am trying to install PHP4 as a DCO for Apache using APXS.
I downloaded php-4.0.4pl1.tar.gz from your site.
I followed the instructions in INSTALL as follows:

./configure --with-mysql=/usr/local/mysql \
 --with-apxs=/usr/local/apache/bin/apxs

Then 

make && make install

It all whirred happily away for a while, and reported no errors.

However, on restarting Apache, and running httpd -l  I do not find mod_php4.c listed.  mod_so.c is listed.  I also cannot locate libphp4.so anywhere on my machine.

Am I right in thinking that my Apache does nothing with PHP files as it cannot be configured to do so due to the absence of this (and no doubt others) programme?

Is this a bug, or have I done something silly?  Either way, what should I do to get PHP up and running?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-31 14:31 UTC] d dot drury at ucl dot ac dot uk
I checked the output of make install - it does not mention libphp.so at all!

Duncan
 [2001-02-01 07:26 UTC] d dot drury at ucl dot ac dot uk
Have tracked down the problem myself.

If you type make before make install the installation doesn't work!

I think this could be made more explicit in the INSTALL file.

In the INSTALL file, section 4a is repeated.  The first occurrence has somehow had part of 3b added onto it.  It reads:
---------------------------------------------------------
4a. Setting up the server. (Dynamic Module)

   The make install command in step 3 should have done most of your
   work for you.  It actually edits your httpd.conf file and tries to
   enable the dynamic PHP module.  To verify this, look for a line that
   looks like this:

      LoadModule php4_module libexec/libphp4.so

   The actual path before the libphp4.so part might differ slightly.  This
   is likely fine.  If you are paranoid you can examine the output from the
   make install step to see where the libphp4.so file was actually put and
   type: make

   Assuming it compiles without errors, proceed to step 4b.
--------------------------------------------------------

The correct text for 4a then continues.  The incorrect text above suggests typing make, which messes the install up.
 [2001-02-01 20:51 UTC] sniper@php.net
You did something silly as there is nothing wrong with the
INSTALL file's instructions..

The correct way to do it (Assuming you have apache with DSO support):

# ./configure --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/path/
# make clean ; make ; make install
# /usr/local/apache/bin/apachectl stop
# /usr/local/apache/bin/apachectl start

( the 'make clean' part isn't needed when compiling from fresh sources which
have just been gunzipped/untarred)

If you still have problems with the installing of PHP then ask further questions
on php-install@lists.php.net mailing list. 

--Jani


 [2001-02-02 05:19 UTC] d dot drury at ucl dot ac dot uk
That is funny, as when I did it with make it didn't work, but when I did it without (as the INSTALL file I have DOES say!)  IT WORKED!
 [2003-03-13 02:04 UTC] alex at cif dot rochester dot edu
I just tried installing php 4.3.1 from source on Slackware 8, and i couldn't figure out why the process wasn't producing a libphp4.so file...

Google brought up this page, and indeed, using 
./configure; make install
works just fine, while
./configure;make;make install doesn't 

In the latter case, the output of make install is missing the lines
[activating module `php4' in /usr/local/etc/httpd/httpd.conf]
cp libs/libphp4.so /usr/local/libexec/libphp4.so
chmod 755 /usr/local/libexec/libphp4.so
cp /usr/local/etc/httpd/httpd.conf /usr/local/etc/httpd/httpd.conf.bak
cp /usr/local/etc/httpd/httpd.conf.new /usr/local/etc/httpd/httpd.conf
rm /usr/local/etc/httpd/httpd.conf.new

after it says

Installing PHP SAPI module

I'm not sure whether the option --with-apxs makes a difference, as i didn't use it.
 [2003-03-13 02:07 UTC] rasmus@php.net
Yes, of course using --with-apxs makes a difference.  Without that option you will never get a libphp4.so, you simply get a php binary.  Please read the installation instructions.
 [2004-09-12 06:17 UTC] brett at brettbrewer dot com
I'm having the exact same problem installing php from the 3.4.8 source. I'm running apache2 from the latest stable install with DSO enabled. I've tried it with and without doing "make" first. I've followed the install instructions to the letter and I can't make it output the .so file no matter what I do. I know my apache install is okay because I'm able to load my old PHP .so file and run scripts under php4.3.3. Here is my configure line:

./configure -with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-gd --with-curl --with-iconv --with-zlib --with-openssl --enable-shared

I run that, followed by: make clean;make;make install

No new .so files are created on my system anywhwere and I get no compile errors either. It looks like it should be working, but no .so is output. WHY WHY WHY WHY WHY!? I've probably done close to 200 google searches over the past 2 days looking for an answer with no luck.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC