cvs: /php3 INSTALL INSTALL.DSO INSTALL.REDHAT

From: Date: Mon, 01 Nov 1999 18:50:59 +0000
Subject: cvs: /php3 INSTALL INSTALL.DSO INSTALL.REDHAT
Groups: php.dev 
Request: Send a blank email to php-dev+get-12068@lists.php.net to get a copy of this message
rasmus Mon Nov 1 13:50:59 1999 EDT Modified files: /php3 INSTALL INSTALL.DSO INSTALL.REDHAT Log: Bring INSTALL instructions up to date and remove --with-shared-apache instructions from INSTALL.DSO Index: php3/INSTALL diff -u php3/INSTALL:1.30 php3/INSTALL:1.31 --- php3/INSTALL:1.30 Sat Jul 10 20:52:18 1999 +++ php3/INSTALL Mon Nov 1 13:50:56 1999 @@ -1,14 +1,36 @@ Installation Instructions for PHP3 ---------------------------------- -For the impatient here is a quick set of steps that will build PHP3 -as a static Apache module for Apache 1.3.0 with MySQL support. A more -verbose explanation follows. For shared module (DSO) instructions see -the 'INSTALL.DSO' file and all RedHat users should have a look at the -INSTALL.REDHAT file. +For the impatient, here is the quickest and easiest way to get PHP +up and running on your server. Also read INSTALL.DSO and INSTALL.REDHAT, +the latter is a must if you are running RedHat Linux. A more verbose +explanation follows: + +QUICK INSTALL (DSO - Dynamic Shared Object) + + (For this to work, your httpd has to have mod_so enabled. Check with + httpd -l) +gunzip php-3.0.x.tar.gz +tar xvf php-3.0.x.tar +cd ../php-3.0.x +./configure --with-mysql --with-apxs=/usr/local/apache/bin/apxs --with-xml +make +make install + At this point you need to edit your httpd.conf file and uncomment the + PHP AddType line that looks like this: + + AddType application/x-httpd-php3 .php3 + +You should also add a line to actually load the PHP module. Something +like this should work: + + LoadModule php3_module modules/libphp3.so + +Then restart your server and it should start parsing .php3 through PHP. + -QUICK INSTALL +QUICK INSTALL (Static Object - requires Apache to be recompiled) gunzip apache_1.3.x.tar.gz tar xvf apache_1.3.x.tar @@ -82,7 +104,7 @@ --activate-module=src/modules/php3/libphp3.a -VERBOSE INSTALL +VERBOSE INSTALL (For static build - See INSTALL.DSO for DSO) Installing PHP3 can be done in four simple steps: Index: php3/INSTALL.DSO diff -u php3/INSTALL.DSO:1.6 php3/INSTALL.DSO:1.7 --- php3/INSTALL.DSO:1.6 Thu Oct 28 12:52:31 1999 +++ php3/INSTALL.DSO Mon Nov 1 13:50:56 1999 @@ -1,26 +1,15 @@ Compiling PHP as an Apache Dynamic Shared Object (DSO) ------------------------------------------------------ -A caveat before you continue. There have been reports of instability -of the DSO version of Apache/PHP on some platforms. If you experience -odd behaviour, try the static compile described in the INSTALL file. -Also if you are not using the latest Apache version, give up and go back -to the static compile, or upgrade your Apache before continuing. - -Contents of this file: - - METHOD 1: The APXS Approach - METHOD 2: The --with-shared-apache approach - (not available in 3.0.11 and later) - Troubleshooting - - -METHOD 1: The APXS Approach ---------------------------- - -This is probably the slickest way to add PHP to an already -compiled/running Apache server. Your server must have been -built to include mod_so (you can check by typing httpd -l) +Before you begin, check that your installed Apache version +is at least version 1.3.6. Version 1.3.9 or later is even +better and you should seriously consider upgrading your Apache +to 1.3.9 or later. This is especially true for glibc-2.1.1 +users. There was a nasty bug related to how DSO's were +linked that wasn't fixed until Apache-1.3.9. + +In order for this build method to work, your server must have +been built to include mod_so (you can check by typing httpd -l) and it needs to have the 'apxs' Perl script installed and configured for your setup. You can build such a server setup using Step 1 below. @@ -47,7 +36,10 @@ make install You will of course most likely want more options here. Run -./configure --help for a full list. +./configure --help for a full list. If you are running Apache-1.3.9 +or later, you should add the --with-xml switch since an xml parser +was included in Apache as of version 1.3.9 and you might as well +let PHP use it if it is there anyway. Step 3: Edit /some/path/conf/httpd.conf and make sure you have a line similar to: @@ -58,11 +50,15 @@ other Apache site-specific things in your httpd.conf. Additionally you need to tell Apache to load and activate the -PHP module. Add the following lines to /some/path/conf/httpd.conf +PHP module. Add the following line to /some/path/conf/httpd.conf LoadModule php3_module libexec/libphp3.so - AddModule mod_php3.c +If you have a ClearModuleList in your httpd.conf file, you need +to add this line to: + + AddModule mod_php3.c + You should also copy php3.ini-dist to /some/path/php3.ini and have a look at it. @@ -76,51 +72,6 @@ or /some/path/bin/apachectl graceful - - -METHOD 2: The --with-shared-apache approach - -This method is not quite as slick as method 1, but it is useful if -for some reason you can't use the apxs approach. You need a full -Apache source tree in order to compile PHP using this approach whereas -in method 1 you only need the files produced by a 'make install' -from an Apache setup. - -Step 1: Make sure Apache's ./configure program has been run at least -once. You don't need to do a full compile, but the Apache ./configure -program generates some header files that PHP needs. The options you pass -to this Apache ./configure step are irrelevant. - -Step 2: Now you need to configure PHP and tell it where your Apache source -tree lives. Use something like this: - -./configure --with-shared-apache=/some/path/to/src/of/apache-1.3.X \ - --with-config-file-path=/some/path -make -make install - -If you need specific extra PHP options, add other flags to the above configure -line. Run ./configure --help to see a full list. - -Step 3: Building Apache - -Go to your Apache src tree directory and run something like: - -./configure --prefix=/some/path \ - --activate-module=src/modules/php3/libphp3.a \ - --enable-shared=php3 -make -make install - -If you already have a full Apache installation that predates the -'make install' feature in Apache, I'd suggest doing a 'make install' -anyway, but set your --prefix directory to some temporary spot and -then go have a look at the files it generates. Especially the -httpd.conf entries to load the PHP module. The only extra thing you -need to do is uncomment (remove the initial #) from the php3 AddType -line. eg. it should look like this: - - AddType application/x-httpd-php3 .php3 Troubleshooting Index: php3/INSTALL.REDHAT diff -u php3/INSTALL.REDHAT:1.17 php3/INSTALL.REDHAT:1.18 --- php3/INSTALL.REDHAT:1.17 Sun Jun 20 06:40:02 1999 +++ php3/INSTALL.REDHAT Mon Nov 1 13:50:56 1999 @@ -8,9 +8,12 @@ under rpm control, read on. The first thing you need to do is upgrade your Apache to at least -version 1.3.4. You need the apache-1.3.4 rpm along with the apache-devel +version 1.3.6. You need the apache-1.3.6 rpm along with the apache-devel RPM. RedHat-6.0 comes with apache-1.3.6, but by default it does not seem to install the apache-devel rpm. Grab that one and install it as well. +While you are at it, upgrade to Apache-1.3.9 or later. There are a +number of fixes, and if you are running glibc-2.1.1 you will definitely +need it. RedHat also has an annoying habit of not installing other -devel packages. The one that gets the most people is freetype-devel. Save yourself some @@ -50,6 +53,7 @@ ./configure --with-apxs=/usr/sbin/apxs --with-mysql --with-ldap (note that you may need /usr/bin/apxs here - check where your apxs is) + (Add --with-xml if you are using Apache-1.3.9 or later) Then type:

« previous php.dev (#12068) next »