Install Apache and PHP

Source: Internet
Author: User

1. Install the Apache package and decompress PHP directly.

2. Add the c: \ PHP path to the system variable path.

4. Go to the PHP installation directory in the resource manager and copy PHP. ini-Dist or PHP. ini-recommended and name it PHP. ini. Then open PHP. ini.

; Extension = php_mysql.dll

Remove the previous; number and change it:

Extension = php_mysql.dll

Find:

Extension_dir = "./"

Change it to the absolute path of the ext subdirectory in your PHP installation directory. For example, my:

Extension_dir = "D: \ PHP \ ext \"

This step is important. Otherwise, PHP cannot find the php_mysql.dll module and cannot load it.

5. Modify HTTP. conf

DocumentRoot "C:/PHP/mywork"
....
<Directory "C:/PHP/mywork">
....

# The following content is newly added

Loadmodule php5_module "C:/PHP/php5apache2_2.dll"
Phpinidir "C:/PHP"

Change directoryindex index.html
Directoryindex index. php index.html

# Addtype application/X-gzip. GZ. tgz
Addtype application/X-httpd-PHP. php
Addtype application/X-httpd-PHP. html

 

6. Test PHP

 
<?Phpphpinfo ();?>

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.