Alexej Kubarev
New member
Before you start, Please not that the information bellow might be inacurate and will rewuire some brain. The ways everything is done may and will vary depending on a operating system and version of the packages..
Downloading PHP/Apache
Before you proceed, I recommend that you take some time to download, install, and configure PHP and a Web server on your machine. Although PHP is compatible with a wide variety of Web servers, I'll assume that you will be using Apache, partly because it is currently the Web's most popular Web server and partly because it is the one most widely used with PHP. Regardless, the general installation process will not differ widely between Web servers.
You can download the PHP distribution from the official PHP site or from one of its many worldwide mirror sites. Go to http://www.php.net for the most recently updated mirror list. From here, you can download PHP in one of two formats:
· WIN32 Binary
· Source code
The Win32 binary is for Windows 95/98/NT/2000 users. While it is also possible to compile the source code on the Windows platform, for the large majority of users this won't be necessary. However, if you insist on doing so (incidentally, a process that is not discussed here), you'll need a recent Visual C++ compiler for doing so.
For non-Windows users, you'll need to build the source code. While many beginners may shudder at this thought, it is actually a rather simple process, as you'll soon learn. For those of you interested to know whether or not PHP is offered in RPM (RedHat Package Manager) distribution format; it is, although these RPMs are not available via the official PHP site. Check the discussion groups (some of which are listed at the end of this chapter) for more information regarding distribution locations and instructions.
Proceed to http://www.php.net and download the distribution that best suits your needs. Download times will vary with your connection type and speed. Additionally, the documentation is available for download. I strongly recommend downloading the most recent version.
Tip PHP 4.3.10 and 5.0.3 are the current stable versions. Of course, this version number is due to change along with the continued development of the PHP package. I recommend always down-loading the most recent stable version of the product.
If you haven't yet installed the Apache server, you will want to download the latest stable version of that as well. These packages are at
http://httpd.apache.org/download.cgi , which contains directories for a plethora of operating systems. Download the one that is specific to your needs. I will concentrate on the Apache server. Regardless of the Web server you intend to use, I strongly recommend reading through the configuration sections to gain some insight into the generalized configuration issues that you may encounter.
Installation of new software can sometimes prove to be a daunting process for newcomers. However, the PHP developers have taken extra steps to make PHP installation relatively easy. The following sections highlight the steps you should take to install and configure PHP on both the non-Windows and the Win32 platforms.
Installation and Configuration
At this point, I'll assume that you have successfully downloaded PHP and Apache. The next step is deciding how you would like to install the distribution.For non-Windows machines, there three different ways to do so: CGI binary, static Apache module, and the dynamic Apache module. As a non-Windows user, chances are you will not want to build PHP as a CGI binary. Furthermore, there are several advantages to building PHP as a server module, therefore I'll concentrate solely on building PHP both as a static and a dynamic module. As it relates to installation, the main difference between the two is that any subsequent changes to the PHP static module will require the recompilation of both Apache and PHP, while changes to the PHP dynamic module only require the subsequent recompilation of just PHP and not the server. For Windows machines, PHP can be installed as either a CGI binary or as a static Apache module. In this case, I'll concentrate upon the CGI binary, since a Windows-user might be more prone to use a Web server other than Apache, like Microsoft's Internet Information Server or Microsoft's Personal Web Server. The CGI version can easily be integrated into these servers. Although I illustrate the PHP/Apache Windows installation process, this process is very similar to that which would be used for the above-mentioned Web servers as well.
You might also need MySQL Database Server. It can be downloaded at http://www.mysql.com How to install it is described here:
http://www.php-forum.com/p/viewtopic.php?t=5507
To be Continued (need a break from typing!)
Downloading PHP/Apache
Before you proceed, I recommend that you take some time to download, install, and configure PHP and a Web server on your machine. Although PHP is compatible with a wide variety of Web servers, I'll assume that you will be using Apache, partly because it is currently the Web's most popular Web server and partly because it is the one most widely used with PHP. Regardless, the general installation process will not differ widely between Web servers.
You can download the PHP distribution from the official PHP site or from one of its many worldwide mirror sites. Go to http://www.php.net for the most recently updated mirror list. From here, you can download PHP in one of two formats:
· WIN32 Binary
· Source code
The Win32 binary is for Windows 95/98/NT/2000 users. While it is also possible to compile the source code on the Windows platform, for the large majority of users this won't be necessary. However, if you insist on doing so (incidentally, a process that is not discussed here), you'll need a recent Visual C++ compiler for doing so.
For non-Windows users, you'll need to build the source code. While many beginners may shudder at this thought, it is actually a rather simple process, as you'll soon learn. For those of you interested to know whether or not PHP is offered in RPM (RedHat Package Manager) distribution format; it is, although these RPMs are not available via the official PHP site. Check the discussion groups (some of which are listed at the end of this chapter) for more information regarding distribution locations and instructions.
Proceed to http://www.php.net and download the distribution that best suits your needs. Download times will vary with your connection type and speed. Additionally, the documentation is available for download. I strongly recommend downloading the most recent version.
Tip PHP 4.3.10 and 5.0.3 are the current stable versions. Of course, this version number is due to change along with the continued development of the PHP package. I recommend always down-loading the most recent stable version of the product.
If you haven't yet installed the Apache server, you will want to download the latest stable version of that as well. These packages are at
http://httpd.apache.org/download.cgi , which contains directories for a plethora of operating systems. Download the one that is specific to your needs. I will concentrate on the Apache server. Regardless of the Web server you intend to use, I strongly recommend reading through the configuration sections to gain some insight into the generalized configuration issues that you may encounter.
Installation of new software can sometimes prove to be a daunting process for newcomers. However, the PHP developers have taken extra steps to make PHP installation relatively easy. The following sections highlight the steps you should take to install and configure PHP on both the non-Windows and the Win32 platforms.
Installation and Configuration
At this point, I'll assume that you have successfully downloaded PHP and Apache. The next step is deciding how you would like to install the distribution.For non-Windows machines, there three different ways to do so: CGI binary, static Apache module, and the dynamic Apache module. As a non-Windows user, chances are you will not want to build PHP as a CGI binary. Furthermore, there are several advantages to building PHP as a server module, therefore I'll concentrate solely on building PHP both as a static and a dynamic module. As it relates to installation, the main difference between the two is that any subsequent changes to the PHP static module will require the recompilation of both Apache and PHP, while changes to the PHP dynamic module only require the subsequent recompilation of just PHP and not the server. For Windows machines, PHP can be installed as either a CGI binary or as a static Apache module. In this case, I'll concentrate upon the CGI binary, since a Windows-user might be more prone to use a Web server other than Apache, like Microsoft's Internet Information Server or Microsoft's Personal Web Server. The CGI version can easily be integrated into these servers. Although I illustrate the PHP/Apache Windows installation process, this process is very similar to that which would be used for the above-mentioned Web servers as well.
You might also need MySQL Database Server. It can be downloaded at http://www.mysql.com How to install it is described here:
http://www.php-forum.com/p/viewtopic.php?t=5507
To be Continued (need a break from typing!)