Re: compile PHP static and use modules?
| From: | Michael Collins | Date: | Thu, 19 Oct 2000 19:55:12 +0000 |
| Subject: | Re: compile PHP static and use modules? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-21248@lists.php.net to get a copy of this message | ||
I am trying to compile PHP static into Apache but still allow for other modules to be utilized via the DSO mechanism. It was suggested by Rasmus that I use --enable-module=so in the apache configure command, and if I want to add a bunch of shared libraries to use --enable-shared=max.
First I tried to use --enable-module=so and --enable-shared=max This gave me PHP as a module (along with a bunch others in /usr/apache/lib/) and I thought PHP was also compiled static into Apache (how can one tell that?) but when I commented out the following:
#LoadModule php4_module libexec/libphp4.so#AddModule mod_php4.c And uncommented: AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps It no longer works so that tells me I had the module of php only. Which is not what I want. So then I ran it again with just --enable-module=so (actually I have done this twice now to check). This did not work as I again got PHP compiled into Apache but no module support. I can tell since I cannot place a load module line into the httpd.conf file without getting an error and the installation process did not create the directory I put "*.so" modules into (which I manually created): /usr/lib/apache/ or /usr/apache/lib/ I also noticed that in the install script the following is output: checking whether to build shared libraries... no checking whether to build static libraries... yes Is this telling me that things are not going according to plan? Here are the exact steps I have taken: [root@www etc]# cd /usr/local/etc/ [root@www etc]# tar zxvf apache_1.3.14.tar.gz [root@www etc]# cd apache_1.3.14 [root@www apache_1.3.14]# ./configure --prefix=/usr/local/apache [root@www apache_1.3.14]# cd .. [root@www etc]# tar zxvf php-4.0.3pl1.tar.gz [root@www etc]# cd php-4.0.3pl1 [root@www php-4.0.3pl1]# ./configure \ --prefix=/usr/local \ --with-mysql=/usr/local/mysql \ --with-apache=/usr/local/etc/apache_1.3.14 \ --enable-track-vars \ --enable-trans-sid \ --with-xml [root@www php-4.0.3pl1]# make [root@www php-4.0.3pl1]# make install [root@www php-4.0.3pl1]# cp php.ini-dist /usr/local/lib/php.ini [root@www php-4.0.3pl1]# pico /usr/local/lib/php.ini [root@www etc]# cd ../apache_1.3.14 [root@www apache_1.3.14]# ./configure \ --activate-module=src/modules/php4/libphp4.a \ --enable-module=php4 \ --prefix=/usr/local/apache \ --enable-module=so \ ****TRiED WITH/ WITHOUT --enable-shared=max *** [root@www apache_1.3.14]# make [root@www apache_1.3.14]# make install [root@www apache_1.3.14]# pico /usr/local/apache/conf/httpd.conf [root@www apache_1.3.14]# /usr/local/apache/bin/apachectl start If anyone has gotten this far, I really appreciate it since this is getting mighty frustrating. Michael -- _/ _/ _/ _/ Michael Collins _/ _/ _/ Equinox Enterprises _/ _/ Seattle, WA, USA _/ mcollins206@home.com