This chapter describes how to install and set PHP3. Introduce necessary knowledge and software. Basic UNIX skills (learn how to operate and "make" a C compiler) a standard ANSIC compiler a WEB server (apparently needed) you can use the UNIX source code compilation and installation to download the latest source code SyntaxHighlighter. all ();
This chapter describes how to install and set PHP3. Introduce necessary knowledge and software.
Basic UNIX skills (learn how to operate and "create" a C compiler)
A standard ansi c compiler
A web server (apparently required)
Compiled and installed using UNIX source code
Download source file
The latest source code can be found at: http://www.php.net
Quick installation instructions (Apache Module version)
1. gunzip apache_1.3.x.tar.gz
2. tar xvf apache_1.3.x.tar
3. gunzip php-3.0.x.tar.gz
4. tar xvf php-3.0.x.tar
5. cd apache_1.3.x
6../configure -- prefix =/www
7. cd./php-3.0.x
8 ../configure -- with-mysql -- with-apache = ../apache_1.3.x -- enable-track-vars
9. make
10. make install
11. cd ../apache_1.3.x
12 ../configure -- prefix =/www -- activate-module = src/modules/php3/libphp3.a
13. make
14. make install
Instead of this step you may prefer to simply copy the httpd binaryovertop of your existing binary. Make sure you shut down yourserver first though.
(You can also replace the preceding steps by directly copying the httpd binary file to overwrite the existing binary file. However, you must first disable your server .)
15. cd ../php-3.0.x
16. cp php3.ini-dist/usr/local/lib/php3.ini
You can edit/usr/local/lib/php3.ini file to set PHP options. If you prefer this file in another location, use -- with-config-file =/path in step 8.
(You can directly edit the/usr/local/lib/php3.ini file to set PHP options. if you store this file in another location, use with-config-file =/path in step 8)
17. Edit your httpd. conf or srm. conf file and add:
AddType application/x-httpd-php3. php3 You can choose any extension you wish here .. php3 is simply the one we suggest.
(You can choose any extension you want. we think PHP3 is very simple .)
18. Use your normal procedure for starting the Apache server.
(You must stop and restart the server, not just cause the server to reload by use a HUP or USR1 signal .)
(You must stop and restart the server, instead of simply using the RELOAD function of the server .)