Apache+php+mysql the latest version of Windows

Source: Internet
Author: User
Tags install php php error

Uninstall the previous Apache

1, Control Panel first Uninstall

2. Delete the Apache directory under E:\Program Files (x86) \apache Software Foundation

First, install Apache

1, custom personalized installation → Change the path to E:\Program Files (x86) \apache software foundation\apache2.2 modified to E

2, after installation, the input http://localhost/appears the It Works Representative installation success

Second, install PHP

PHP decompression path is here e:/php

Note: PHP extracted to the following directory E:/program Files (x86)/php,apache loading PHP error, should be extracted to the e:/php directory, no spaces directory "

Third, install MySQL

Configuration:

Configuration of Apache

A) Configure Apache to support PHP:

i) conf in the Apache installation directory:
"Find the following:
DirectoryIndex index.html
Revision changed to
DirectoryIndex index.php index.html "
To output PHP statements. If you can output all, a PHP interface instead of a statement, PHP has been compiled successfully
NOTE: The Apache configuration file already supports PHP file compilation "The last sentence of this article has the description", that is, the Apache root directory to create a new index.php, and then enter the 127.0.0.1 will appear PHP interface

II) In addition to the above article

Add the following three lines to the Apache httpd.conf configuration file to set up the Apache 2.x PHP module:

# for PHP 5 use these two lines:

LoadModule php5_module "C:/php/php5apache2.dll"

AddType application/x-httpd-php. php

# Configure the path to the php.ini

Phpinidir "c:/php"

Pro-Test, I modified for, in #loadmodule vhost_alias_module modules/mod_vhost_alias.so add the following three lines:

LoadModule Php5_module e:/php/php5apache2_2
Phpinidir e:/php
AddType application/x-httpd-php. php. html. htm

b) Configure the Apache root directory

The default root directory is htdocs in the Apache installation directory
E:\Program Files (x86) \apache software foundation\apache2.2 under Htdocs

Two places to modify: 1, "See this name to know the root" DocumentRoot "E:/htdocs" 2, <directory "E:/htdocs" >. ... A section of notes </Directory>

--------------------------------------------------------------------------------------------------------------- --------------------

This will be created in E:htdocs a new index.php edit the following, and then enter localhost will appear Apache support PHP interface

<?php

Phpinfo ();
?>

b) Configure PHP to support MySQL"Simply put: Apache support php,php support MySQL load"

Find the following:

; On Windows:

; Extension_dir = "ext"

Revision changed to

; On Windows:

Extension_dir = "E:/php/ext"

-----------------------

Remove the comments below and PHP will load the following library

Extension=php_curl.dll
Extension=php_gd2.dll
Extension=php_mbstring.dll
Extension=php_mysql.dll

Extension=php_mysqli.dll
Extension=php_pdo_mysql.dll
Extension=php_pdo_odbc.dll
Extension=php_xmlrpc.dll

Support Session operation

Session.save_path = "/tmp" below add the following
Session.save_path = "E:/php/custom/session"

After completing the session setup, we also need to configure a folder path, that is, the PHP temporary file path, learning PHP students know that when uploading files through PHP, the file is first in a temporary folder.

Support Upload operation

; Upload_tmp_dir =
Upload_tmp_dir = "E:/php/custom/upload"

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.