Install PHP and Its modules
We know that ASP requires support from PWS or IIS servers. Without these two servers, it cannot run. ASP servers support the installation of ASP
Interpreter and WEB server.
Similarly, the installation of PHP is divided into two parts: one is the installation of PHP and Its modules, and the other is the installation of WEB servers. Install PHP and Its modules, including the installation of PHP core files,
Related extension module installation and PHP. INI File options.
If PHP does not have a WEB server, it cannot play a major role. Therefore, you must install a WEB server and make necessary configurations so that the WEB server can process PHP scripts.
.
Most of our operating systems are Microsoft windows. Next we will introduce the php running environment and WEb Server Installation on the windows operating platform.
I. Installation of PHP and Its modules
PHP installation is relatively simple. First of all, we need to download the PHP compressed package (the zip package used in the example is php-4.1.2.tar.gz) from the http://www.php.net/site, and then click to install them, usually we install it to C: \ PHP Directory (this depends on the operating system drive letter ).
A Dynamic Link Library is required for all plug-ins. If the module file you install is not included in PHP, you can go to the http://www.php.net/website to find and download it, and then copy it to the C: \ PHP Directory. This completes the installation.
The next step is the time to concentrate. For those who are new to PHP and are learning PHP, this step is very important, because if it is not set correctly, there will be no explanation of any PHP script, that is, the basic runtime conditions of PHP you need are not set up.
Next we will talk to the PHP configuration file php. ini. Copy the text configuration file PHP.INI-DIST under the PHP installation directory to your Windows Directory (c: \ windows or c: \ winnt. Modify the file suffix to php. ini. There is a very important issue here. Note that if you have php in the windows directory and the php Directory at the same time. the INI file takes precedence over the files in the php Directory. That is to say, the php interpreter regards the files in the PHP Directory as the php configuration file, and the files in the windows directory will not work.
Careful friends will notice that there is another php in the php Directory. ini-optimized file. ini-dist is also the configuration file of the PHP interpreter. The configuration content of the two is similar, but the former is optimized in some options to reduce the system memory usage. However, it is recommended that you do not use this file if you are not familiar with PHP, because it is stored in php3 and may cause some module functions to fail when used in php4.
There are also a lot of php. ini file configuration files on the network, but there are a lot of misunderstandings in it. Some misunderstandings are introduced below:
How to install Apache (PWS) PHP4 MySQL phpMyAdmin in Windows 98
"
Author: Tony Reeves ()
Posting date: 08/08
**************************************
1. Install PHP4
Software obtained: Foreign http://www.php.net; Domestic http://www.phpchina.com, http://phpuser.com and so on get compressed package decompress to c: \ php4 directory.
**************************************** *********************
Copy php4ts. dll (*** in the extract directory ***),
And msvcrt. dll (** In the subdirectory dll in the decompressed directory ***)
To C: \ windows \ system
...
"
Install PHP4 and MySQL in Windows 2000
"
Author: chenlinhaime
Published on: 2000/08/03
My php4and mysqlsoftware packages are php-4.0.1pl2-win32.zip1_mysql-3.23.19-beta-win.zip.
...
Install php4, decompress the package with winzip to c: \ php4, and copy all dll files in the directory to c; \ winnt \ system32, do not overwrite existing dll files
Copy the php.exe and php. ini-dist files in the directory to c: \ winnt;
Rename c: \ winnt \ php. ini-dist to php. ini, open it, and find; Windows Extensions, replace extension = php_calendar.dll, extension = php_zlib.dll
, Extension = ";" before php_ldap.dll, remove and close the file.
...
"
PHP installation setup Tutorial:
"
...
2. Install PWS to the default directory (by a typical installation) 3. Install php4 (the name of the file I downloaded is: php-4.0b4pl1-Win32.zip and unzip it out) there are the following files under the PHP Directory
Php. ini-dist... php4isapi. dll php_mysql.dll (1) copy all dll files to your system directory, such as C: \ windows \ system \
(2) convert php. ini-dist is renamed as php. ini, modify php. extension_dir =. /For extension_dir = c: \ windows \ system \; (3) Modify Php. in ini
; Extension = php_mysql.dll remove the ";" sign (that is, extension = php_mysql.dll) from the front)
...
"
It does not mean that their configuration methods are wrong. The so-called article is in Rome, and the method in the article can achieve the same purpose, but there are many more steps, in the above three articles, php *. this step can be omitted if dll is copied to windows \ system, because php is not modified after configuration. in ini, "extension_dir =. /"path, the server can directly recognize the path of the php dynamic link library file, no need to look for it again, so there is a misunderstanding in the above configuration file, of course, this is not to say that the configuration is incorrect. As they said, the corresponding file replication and php. after the INI file is configured, the server will also load the php dynamic link library file by path.
Note: For more exciting tutorials, please pay attention to the "computer tutorial" section of the "group: 189034526 welcome to join