40Part IPHP: The (Web hosting compare) BasicsBefore you can beginBefore you
40Part IPHP: The BasicsBefore you can beginBefore you can install PHP on any platform, you need: .A server or workstation with enough RAM for your OS. .A Unix, Mac OS X, or Windows operating system installed. .A working, dedicated Internet connection if you are running a production site; and/orinstallation on an intranet for a development site; or neither if you are running a totallystandalone PHP setup (although without an Internet connection, you must find anothersource for the necessary software packages). Help for these prerequisites is beyond the scope of this book. You might want to look at thefollowing sources for networking information: .World of Windows Networking (www.wown.com) .Linux Documentation Project (www.linuxdoc.org/HOWTO/HOWTO-INDEX/howtos.html) If you plan to install PHP on Windows, you ll also need: .A working PHP-supported Web server. Under previous versions of PHP, IIS/PWS was theeasiest choice because a module version of PHP was available for it; but PHP now hasadded a much wider selection of modules for Windows. .A correctly installed PHP-supported database (if you plan to use one) .The PHP Windows binary distribution (download it at www.php.net/downloads.php) .A utility to unzip files (search http://download.cnet.comfor PC file compressionutilities) Apache2 and PHPApache is probably the Web server most commonly used with PHP and MySQL so commonthat the acronym LAMP has emerged to describe precisely this combo (Linux Apache MySQLPHP). At the moment, both Apache and PHP are in the middle of major releases and unfortu- nately there are reasons why the two upgrades may be incompatible. The main change in the huge architectural update of Apache2 is thread-safety. In Apache1, eachserver request spawned a separate child process. This has one huge advantage if one processfails, it will not crash the whole server. However, it also leads to perceived inefficiencies on someoperating systems, particularly Windows although in many cases, particularly Linux, Apache2 isnot more efficient than Apache1. Unfortunately, a lot of PHP extensions cannot easily be made thread-safe and probably neverwill. The PHP development team, therefore, has gone on record recommending against anupgrade to Apache2 in a production environment. This recommendation will, in turn, slow theadoption of Apache2 by preventing people from finding bugs so they can be fixed. It s unclear ifthis recommendation will change. So here s the bottom line: Most PHP users do not need to upgrade to Apache2. Users of high- load production systems may be risking a total httpd crash if one thread goes down. PHP perfor- mance is unlikely to be improved on Linux, although it may be on Solaris or Windows. If you dochoose to upgrade to Apache2, prefork mode is far safer than multithreaded mode, although itdoesn t offer much performance gain over Apache1.05
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check Vision professional web hosting services