APACHE2.2+PHP5 installation steps under Windows

Source: Internet
Author: User
Tags nginx server

APACHE2.2+PHP5 installation under Windows

Beginners in the study of PHP may encounter the installation of Apache and PHP unsuccessful problems, so many developers chose the integration package, one-click installation of Apache+php+mysql. However, because the software versions in the integration pack are fixed and not easy to upgrade, there are times when other extensibility issues are encountered. Here we come to one by one install Apache and PHP5, because the installation of MySQL is relatively simple, does not involve some configuration, so generally no problem, here also does not involve.

First install Apache, I use the 2.2 version, basically is the next step, no problem. Then unzip the PHP to the location you want (the path does not have a Chinese or a space, so as not to cause problems). Now your Apache can be started successfully, you can visit, you should be able to see "It works!." (Note that the Apache configuration under Windows php,php to select a thread-safe version)

The next step is to configure Apache and PHP configuration files so that Apache can support the parsing of PHP files. In Apache, we use the mode of module loading to parse PHP files, about this aspect, we do not have to tangle, because in Nginx server we usually use fastcgi way to run PHP, here just by the way, do not know the reader can self-Baidu query.

Changes to the Apache configuration file:

Locate the httpd.conf file under the Conf folder in the Apache directory and copy a backup to prevent the error from being restored. Open the file and add the following sentence to the bottom of the file (note that the path is modified to the path on the respective machine, do not copy and paste the changes):

LoadModule php5_module "D:/microsoft/wamp/php5.3.28/php5apache2_2.dll"

Add the following line at the end of the file: (meaning that the server will call the PHP parser parsing the files that are experiencing these three extensions)

AddType application/x-httpd-php. php. htm. html

Phpinidir "d:/microsoft/wamp/php5.3.28/"

Changes to the PHP configuration file:

Rename the php.ini-dist or php.ini-development configuration file to PHP.ini

1. Open Extension_dir = "D:/microsoft/wamp/php5.3.28/ext"

2. Open and set time zone Date.timezone = Asia/shanghai

3. Open the appropriate extension you need

Restart the server and PHP will be ready to run.

APACHE2.2+PHP5 installation steps under Windows

Related Article

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.