Build PHP Environment under window

Source: Internet
Author: User

This article introduces the content is about the window to build PHP environment, has a certain reference value, now share to everyone, the need for friends can refer to

Download address and order of each module's standalone installation:

    • Apache

    • Php

    • Mysql

Install Apache:

    • Download Apache, select ApacheHaus (easy to debug);

    • Select the corresponding operating system, 32-bit or 64-bit;

    • D Disk new phpenv folder D:\phpenv\ , unzip the downloaded compressed package to this folder (easy to manage)

    • Modify the httpd.conf ServerRoot to point to the installation file

  Define srvroot "D:/phpenv/apache24"
    • Enter the installation command

      D:\phpenv\apache24\bin>httpd-k Install
    • Enter the start command

      D:\phpenv\apache24\bin>httpd-k start
    • Test if Apache is installed successfully. Browser input http://localhost , It works can appear

    • httpd.confWrite to PHP support module

# PHP Environment Add module loadmodule php5_module "D:/phpenv/php-5.6.36/php5apache2_4.dll"//php-5.6.36 for PHP install directory name Phpinidir "d:/ Program Files/wamp/php-5.6.36/php.ini "# Add PHP support AddType application/x-httpd-php. php# Add home File type support <ifmodule dir_ module>    directoryindex index.html index.htm index.php</ifmodule>

Install PHP

    • Download PHP, select the thread safe version of PHP version, extract toD:\phpenv\php-5.6.36\

    • Rename the php.ini-production file to php.ini , and enter the file will be ; extension_dir = "./" modified toextension_dir = "D:/phpenv/php-5.6.12/ext"

      Open the following file (remove the previous;)

Extension=php_curl.dllextension=php_gd2.dllextension=php_imap.dllextension=php_mbstring.dllextension=php_ Mysql.dllextension=php_mysqli.dllextension=php_pdo_mysql.dllextension=php_snmp.dllextension=php_ Soap.dllextension=php_sockets.dll
    • Verify that PHP is installed, and enter at the command line: Restart the httpd -k restart service.
      D:\phpenv\Apache24\htdocsCreate a new file under the path phpinfo.php , add the content <?php phpinfo();?> , and then enter the http://localhost/phpinfo.php test in the browser.

Some problems with installing Apache

1.

Errors reported here must is corrected before the service can be started. (OS 10013) makes an attempt to access the socket in a way that is not allowed by access rights.  : AH00072:make_sock:could not bind to address [::]:80 (OS 10013) has made an attempt to access the socket in a manner not permitted by access permission.  : AH00072:make_sock:could not bind to address 0.0.0.0:80ah00451:no listening sockets available, shutting downAH000 15:unable to open logs

Cause: The port is occupied.

Workaround: Modify Apache24\conf\httpd.conf The port number in the file Listen ServerName .

This sets the 80 to 8080.

2.

Errors reported here must is corrected before the service can be started. (OS 10048) is typically used only once per socket address (Protocol/network address/port).  : AH00072:make_sock:could not bind to address 0.0.0.0:443ah00451:no listening sockets available, shutting downAH00 015:unable to open logs

Cause: The listening port is occupied. With Skype installed, 443 ports are occupied on Skype.

Method: Modify Apache24\conf\extra The next httpd-ahssl.conf , httpd-ssl.conf .

Change the 443 to 442 here.

Resources:

Apache Installation Tutorials

Apache Error

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.