Appendix C. Installing PHP 5 Alongside PHP 4

 <  Day Day Up  >  

A major difficulty in migrating from PHP 4 to PHP 5 is testing code under PHP 5 without giving up PHP 4. You cannot install both Apache modules on the same web server, but it's possible to install one as a CGI. This allows you to experiment with PHP 5 and debug your applications without giving up PHP 4 in the process.

The CGI version of PHP is less efficient than the module version and has a few limitations, such as the inability to hook into Apache's HTTP Basic Authentication mechanism. Nevertheless, this is a good way to start out using PHP 5. When you're just testing scripts, performance is less of a problem. When most of your code is PHP 5-ready, you can then install the module version of PHP 5 for final testing and benchmarking and run PHP 4 as a CGI.

This appendix is more technical than other parts of the book. It assumes you're comfortable installing PHP from source code and have root access on your machine. It also assumes you're using PHP with the Apache web server. If you're running a different server, you must translate these instructions accordingly .

 <  Day Day Up  >  


Upgrading to PHP 5
Upgrading to PHP 5
ISBN: 0596006365
EAN: 2147483647
Year: 2004
Pages: 144

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net