PHP Environment Setup

Source: Internet
Author: User
Tags install php fully qualified domain name

Apache module to run PHP environment build method Download Apache

Note: Apache is downloaded in http://www.apachelounge.com/because the website provided by Apache is compiled by a later version of the VC compiler. Since the PHP version I downloaded next is VC11, the version of Apache downloaded is also based on VC11.
Download:httpd-2.4.10-win64-vc11

Download PHP

PHP version of how to choose to see "PHP Version Selection", Php:http://windows.php.net/download.
DOWNLOAD:VC11 x64 Thread Safe (2015-jan-22 03:12:55)

Installing Apache
  1. Extract Apache to C drive
  2. CMD under Start Apache.
      
         
       
    1. C:\Apache24\bin>httpd
  3. Browser testing
    Enter http://localhost/in the browser, if the interface successfully displays "It works!" indicates that Apache started successfully.

  4. Install to the Windows Service so that the system will automatically open Apache later.

      
         
       
    1. C:\Apache24\bin>httpd -k install
Common HTTPD commands
    • -K Start: Start Apache
    • -K Restart: restarting Apache
    • -K Stop: Off Apache
    • -K Install: Installing Windows Services
    • -K Uninstall: Uninstalling the Windows service
Tips and issues that may arise from the above process

Error:AH00558: httpd: Could not reliably determine the server‘s fully qualified domain name, using fe80::5825:3995:1bca:8a19. Set the ServerName‘ directive globally to suppress this message
Solve:并不影响正常使用,如需解决,在C:\Apache24\conf\httpd.conf 中搜索 ‘ServerName‘ , 将 ‘#ServerName www.example.com:80‘ 改成 ‘ServerName www.example.com:80’ (去掉前面的#符号)

Install PHP
  1. Unzip PHP to C drive
  2. Change the "php.ini-development" file under the directory to "PHP.ini"
  3. Search "Extension_dir"
        
       
    1. ; On windows:
    2. ; extension_dir = "ext"
    3. 改成
    4. ; On windows:
    5. extension_dir = "ext"
  4. Search for the following to open them all (open to remove the previous '; ') No.
        
       
    1. extension=php_curl.dll
    2. extension=php_gd2.dll
    3. extension=php_mbstring.dll
    4. extension=php_mysql.dll
    5. extension=php_pdo_mysql.dll
    6. extension=php_pdo_odbc.dll
    7. extension=php_xmlrpc.dll
Integrate PHP and Apache

At the end of the httpd.conf file under Apache Config, add the following, if your PHP directory is not in the C drive, be careful to modify the path

  
 
  1. LoadModule php5_module "C:/php5521/php5apache2_4.dll"
  2. AddHandler application/x-httpd-php .php
  3. AddHandler application/x-httpd-php .htm
  4. # configure the path to php.ini
  5. PHPIniDir "C:/php5521"


From for notes (Wiz)

PHP Environment Setup

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.