PHP + Apache + MySQL classic match, create environment 1 PHP installation (reprinted and modified)

Source: Internet
Author: User

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:

    1. PHP Compiler: the core supporting PHP running
    2. Apache Web Server: Provides Web services and supports PHP parsing.
    3. MySQL database: Used to learn PHP operations on MySQL Databases
    4. Operating System: the default is personal PC, and Windows 2000 and above are installed.
    5. Editing tools: editplus or IDE tools such as Zend studio or eclipse
    6. Browser: IE6 or later and Firefox Latest Version
    7. 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.