Currently, I am studying the development of backend server, so I chose to build it in PHP + Apache + MySQL mode.
In.
So the main content is from: http://www.5idev.com/p-php_install.shtml
My environment is Windows XP, SP3
Php development environment Installation
PHP learning environment
To learn about PhP, we need to prepare an environment that supports PHP running:
- PHP Compiler: the core supporting PHP running
- Apache Web Server: Provides Web services and supports PHP parsing.
- MySQL database: Used to learn PHP operations on MySQL Databases
- Operating System: the default is personal PC, and Windows 2000 and above are installed.
- Editing tools: editplus or IDE tools such as Zend studio or eclipse
- Browser: IE6 or later and Firefox Latest Version
- File storage location: e: HTML
Note: The file storage location is not specific, as long as your Apache Web Server can be parsed, It is set here to be consistent with the XHTML + CSS tutorial.
PHP installation
PHP official: http://www.php.net/downloads.php (Although the latest version is 5.4.6, but it is recommended to download 5.2.17 thread security version with the tutorial,: http://windows.php.net/downloads/releases/php-5.2.17-Win32-VC6-x86.zip
Because some library files in the new version do not exist, they cannot match the steps described in this document. If you still want to use the new version, you 'd better find a new tutorial. Otherwise, the following error will occur and you do not know how to solve it.)
From the above download PHP compiler Win32 compressed package (the current general version is 5.2.x), such as: php-5.2.13-Win32.zip, and decompress to local hard disk such as E: PhP5.
The files and directories in E: PhP5 are roughly as follows:
- Dev folder
- EXT folder
- Extras folder
- Pear folder
- Some DLL files such as aspell-15.dll
- Some EXE executableProgramSuch as php.exe.
- Some text files such as PHP. ini-Dist
After confirming that the preceding extraction is correct, follow these steps:
1. First, copy all DLL files in PhP5 (including DLL files in the ext folder) to the System32 folder in windows, such as C: windowssystem32. This step is to allow the Windows system to obtain the DLL file run by PHP. The significance is the same as that of specifying the system environment variable, but to make it simple, copy the DLL file directly to the Windows System directory.
2. Change "php. ini-Dist" to "php. ini ". PHP. INI is a file that records PHP configuration information. Open PHP. ini in the editor and configure the following format:
; Extension = php_bz2.dll
";" Indicates that the configuration is invalid. Therefore, we need to remove the ";" sign before the configuration item we need:
Extension = php_curl.dllextension = php_gd2.dllextension = php_mysql.dll
Extension = php_mysqli.dll
Extension = php_pdo.dllextension = php_pdo_mysql.dllextension = php_pdo_sqlite.dll
For example, extension = php_gd2.dll indicates that PHP is enabled to support the GD2 Image Library. These are commonly used configurations, which are also supported by most host vendors.
3. Set the extended support directory
If you follow the preceding settings, the system still prompts that the extension module is not supported. If MySQL is not supported, You can manually set the extension directory in the PHP. ini file:
Extension_dir = "E:/PHP/EXT"
Time zone settings
PHP introduced the time zone setting concept from 5.1, which will affect time formatting and other functions. Check that the time zone settings of the php. ini file are as follows:
[Date]; defines the default timezone used by the date functionsdate. timezone = PRC
Save the settings and copy the php. ini file to the Windows folder, for example, C: Windows.