httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikolaus Schmitt" <n.schm...@scaet.de>
Subject Re: [users@httpd] add module
Date Sat, 30 Aug 2003 09:04:29 GMT
Hm.
>But It doesn't work. I don't know if I have write something in the
httpd.conf or copy something from the php to the >libexe directory or not!
Please be more exact. Did the build not work?

>From the beginning:
------
To make "PHP" work, at least two things need to be done:

1. A file "mod_php.so" should reside, where the other apache modules are.
   Usually, the modules reside within the directory <apache_home>/libexec

   If there is no file "mod_php.so" or "mod_php-x.y.z.so", You need either
to
   fetch a binary, ready-to-run module from the web, or build the module php
   from the sources by Yourself.

   See "BUILD" below.

2. Apache needs to get told to load that module on startup.
   This is done by the statement "LoadModule php_module libexec/mod_php.so"
   within the httpd.conf.


BUILD
=====
To build mod_php.so, you need:
- the source tarball from a nearby mirror
- a directory where to let the build happen
- the apache build & development utilities "libtool" and "apxs".
   to build a dynamic loadable, shared module
  >or<
  a prepared apache source tree to build the module
  statically into apache.
- probably the "root" account for installation purposes
- compiler and utilities

All this is properly described in the files "README", "BUILD", "INSTALL" and
at apache.org
You should study the docs carefully.

Assuming a "build directory" /home/builds one could do the following steps
to
build apache and mod_php from scratch:
(check the proper commands and options for building with the doc)

# build apache 1.3.x
cd /home/builds
mkdir download
cd download
wget http://www.apache.de/dist/httpd/apache_1.3.28.tar.gz
cd ..
tar -xzf download/apache_1.3.28.tar.gz
cd apache-1.3.28
./buildconf.sh
./configure --enable-layout=opt \
                  --prefix /home/build/myapache \
                  --enable-modules=all \
                  --enable-shared=all \
                  --enable-so
make
make install
# apache should now be installed at "/home/myapache"

# build mod_php as dso module
cd /home/builds/download
wget http://www.apache.de/dist/httpd/apache_1.3.28.tar.gz
cd ..
tar - xzf download/php-4.3.3.tar.gz
cd php-4.3.3
./buildconf.sh # if applicable
./configure --with-apxs=/home/myapache/bin/apxs
make

# copy mod_php.so to apache/libexec
cp $(find build -name "*.so") /home/myapache/libexec
chmod 750 /home/myapache/libexec

# clean up build area
cd /home/builds
rm -rf apache-*
rm -rf php-*

# configure apache
Add the lines to httpd.conf:
AddModule mod_php.c
LoadModule php4_module        modules/libphp4.so     /* for PHP 4
AddType application/x-httpd-php .php"


READ THE DOCS.
:-)




 tanks

----- Original Message -----
Ok! I'm running on linux.
I havnt installed apache-devel. I remember that I have configure the apache
with enable-modul=all enable-shared=max and have done:
>>unpack mod_php sources to some place
>>cd to that place and call
>>/configure --with-apxs=/<path to your apache 1.3. installations apxs file>
>>make
>>make install

>But It doesn't work. I don't know if I have write something in the
httpd.conf or copy something from the php to the >libexe directory or not!



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message