Detailed steps for configuring the PHP Server environment

Source: Internet
Author: User
Detailed steps for configuring the PHP Server environment

  1. # Import the PHP5 module
  2. LoadModule php5_module "D:/Program Files/PHP/php5apache2_2.dll"
  3. # Identify the file ending with. php in the URL
  4. AddType application/x-httpd-php. php
  5. # Identify the file ending with. phps in the URL
  6. AddType application/x-httpd-php-source. phps
  7. # Default PHP homepage for websites
  8. DirectoryIndex index.html index.htm index. php default. php
  9. # Directory for storing PHP. ini
  10. # PHPIniDir "D:/Program Files/PHP"

Note: If PHP. ini is stored in C:/WINDOWS (or C:/WINNT), you do not need to configure PHPIniDir.

Then, open D:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd. conf in Notepad.

Add a line at the end of the file: Include conf/extra/httpd-php5.conf

Step 4: Test the php server configuration and check whether the php environment is successfully set up? Restart Apache and open the directory D:/Program Files/Apache Software Foundation/Apache2.2/htdocs to create a file: index. php input content:

  1. Phpinfo ();
  2. ?>

Open your browser and view http: // localhost or http: // 127.0.0.1. Php Server environment setup and configuration (apache and iis) php Server environment construction method: Configure php Server environment in ubuntu php and mysql server configuration description php obtains server information Class php obtains server information alternative method php obtains server information a piece of code

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.