Installation and configuration method of PHP5.2.17 under Windows system
PHP (Hypertext Preprocessor) is a general open source scripting language, especially suitable for websites development. Under Windows systems, installing PHP can help developers develop dynamic web pages. This article will introduce how to install and configure PHP5.2.17 under Windows system. I hope it will be helpful to the installation and configuration of PHP under Windows.
Step one: Download the PHP5.2.17 installation package
First, you need to download PHP5 from the official website of PHP (http://php.net/releases/) .2.17 installation package, select the version that matches your operating system to download. After the download is complete, unzip it to a suitable directory, such as C:php
.
Step 2: Configure PHP
C:php
directory and find php.ini-recommended
file, make a copy of it and rename it to php.ini
. Use a text editor (such as Notepad) to open the php.ini
file. You can make some configuration modifications according to the specific situation, such as:
date.timezone = Asia/Shanghai
extension=php_mysql.dll
. php.ini
file. Step 3: Configure the Apache server
When building a PHP development environment under Windows systems, the Apache server is usually used. The next step is to configure the Apache server to load the PHP module.
httpd.conf
, usually in the conf
folder under the Apache installation directory. Find the LoadModule
section in the httpd.conf
file and add the following code:
LoadModule php5_module "C:/php/php5apache2_2.dll" AddType application/x-httpd-php .php PHPIniDir "C:/php"
httpd.conf
file and restart the Apache server. Step 4: Test PHP
Create a in Apache’s
htdocs directory phpinfo.php
file, the file content is:
<?php phpinfo(); ?>
http://localhost/phpinfo.php
to access, if you can see PHP information page, indicating that PHP has been successfully installed and configured. Through the above steps, we successfully installed and configured PHP5.2.17 under the Windows system and tested it through the Apache server. I hope this article will be helpful to friends who want to set up a PHP development environment under Windows systems.
The above is the detailed content of Installation and configuration method of PHP5.2.17 under Windows system. For more information, please follow other related articles on the PHP Chinese website!