"PHP" Windows installation php5.5+apache2.4

Source: Internet
Author: User

Integration of php5.5 and apache2.4

See PHP Version upgrade, you want to try the new features

First, ready to download the file

apache2.4.9 http://www.apachelounge.com/download/

Since my computer is 32-bit, I chose Win32.

Httpd-2.4.9-win32-vc11.zip

php5.5.9 http://windows.php.net/downloads/releases/archives/

PHP I chose a thread-safe

Php-5.5.9-win32-vc11-x86.zip

VC11 Runtime Library http://www.microsoft.com/zh-CN/download/details.aspx?id=30679

The latest version needs to be VC11 run library.

Second, the configuration of php5.5.9.

Create a new folder on the C-disk Wamp our program. The directory is as follows

Unzip PHP into the php5.5.9 folder

Duplicate a copy of the php.ini-development and rename it to PHP.ini.

Configure PHP.ini

731 lines Configure the path to the expansion library

Extension_dir = "C:/wamp/php5.5.9/ext"

873 lines start opening the expansion library you need

923 Line configuration Time zone

Third, the configuration of apache2.4.9

Unzip the downloaded file

Configure under httpd.conf under Conf

The 37th line ServerRoot "C:/apache24" to ServerRoot "ServerRoot" C:/wamp/apache24 ";//apache the location of the program.

Line NO. 213 servername The "#" number in front of the local, you can change it to localhost.

No. 249 Line DocumentRoot "C:/apache24/htdocs" to DocumentRoot "C:/wamp/apache24/htdocs";//The root directory of the website can be defined by itself

Line No. 250 <directory "C:/apache24/htdocs" > Changed to <directory "C:/wamp/apache24/htdocs" >;

Note: This WWW folder to be built on its own, do not build the words will be error.

Line No. 283 DirectoryIndex index.html change to DirectoryIndex index.html index.php index.htm//Support more default pages

Line No. 366 scriptalias/cgi-bin/"c:/apache24/cgi-bin/" instead of scriptalias/cgi-bin/"C:/wamp/apache24/cgi-bin"

Line No. 382 <directory "C:/apache24/cgi-bin" > Changed to <directory "C:/wamp/apache24/cgi-bin" >

Configure Apache and PHP integration

#加载php5apache2_4. dll files

LoadModule php5_module "C:/wamp/php5.5.9/php5apache2_4.dll"

#使apache Parsing PHP files
AddHandler application/x-httpd-php. php
# Configure the path to PHP.ini

File path for #配置php. ini
Phpinidir "c:/wamp/php5.5.9/"

Iv. launch of Apache

Under command line

Go to the bin directory in Apche

Apache is ready to start. Do not close the window after startup, or Apache will shut down.

Iv. Join the system service for Windows and let Apache self-boot.

(1) Close the httpd command window that you just opened, or you will get an error.

(2) Start---Run, enter cmd, and then open a command prompt. Input cd C:\wamp\Apache24\bin

The command to join the service here is: Httpd.exe-k install-n "ServiceName"

ServiceName is the name of Apache in Windows services. Example:httpd.exe-k install-n "Apache24"

after entering httpd.exe-k install-n "Apache24", there will be a successful installation of the prompt, "service" will also have Apache24 this service item. This time you can choose to start the Apache service.

If you want to uninstall this service, first stop the service and then enter httpd.exe-k uninstall-n "Apache24" to uninstall the service.


Our system services show the

Use net start Apache24 (service name) to start apache2.4.9.

Close Apache net stop Apache24

The restarted Apache needs to be shut down before booting.

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.