Configure Apache to support PHP5 apache php suite apache add php module apache deploy php item

WBOY
Release: 2016-07-29 08:54:24
Original
1201 people have browsed it

Environment: window 7, Apache/2.2.19 (Win32) PHP/5.2.9-1

1. Configure the server name

Just remove the #ServerName localhost:80 comment inside.

Re-run the Apache service.

Then you can access http://localhost:80 through the browser. If the page is displayed, it means that apache has been installed and started successfully.


2. Add php support

1

LoadModule php5_module "D:/php-5.2.9/php5apache2_2.dll"

Add
AddType application/x-httpd-php .php .php5 .php4 .php3 .phtml . phpt
AddType application/x-httpd-php-source .phps

3. Add php.ini directory

1

PHPIniDir "D:/php-5.2.9" PHP Path

4. Update the php.ini file

Change php.ini-DEVELOPMENT under PHP to php.ini

5. Test test.php

Add test under Apache htdocs .php

1

2

3

<?php

phpinfo();

?>

The above introduces how to configure Apache to support PHP5, including the content of Apache and php5. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template