Home  >  Article  >  Backend Development  >  Apache+PHP+Mysql configuration

Apache+PHP+Mysql configuration

WBOY
WBOYOriginal
2016-07-29 09:14:41848browse

The environment is configured, but problems encountered during the process, backup solution.

Ingredients:

Apache service Monitor

PHP 5.2

Mysql 5.5

Install all the above

1. ConfigurationApache

First modify the configuration file of Apache. The Apache configuration file is httpd.conf in the conf directory of the Apache installation directory.

1. Let Apache parse the php file

Find #LoadModule in the configuration file Add vhost_alias_module modules/mod_vhost_alias.so in one line

LoadModule php5_module "D:/WebServer/php/php5Apache2_2.dll"

AddType application/x-httpd-php .php

PHPIniDir "D:/WebServer/php"

2. Configure the start page

DirectoryIndex index.html changed to DirectoryIndex index.php index.html

3. Modify the Apache site directory and the project storage space

DocumentRoot "D:/Develop/Apache2.2/htdocs": Website storage Location , the same as the "home directory" in IIS changed to

DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/test"

Apache2.2/htdocs">: Control access to the directory of the main site and change it to
Apache Software Foundation/Apache2.2/htdocs /www.lizhonghongyun.com">

2. Configure PHP

php.ini-development was renamed to php.ini
Modify php.ini
extension_dir = "ext" to extension_dir = "D:/WebServer/php/ext"; =php_gd2.dll
;extension=php_mbstring.dll
;extension=php_mysql.dll
;extension=php_xmlrpc.dll
Modification date
;date.timezone = changed to date.timezone = Asia/Shanghai
3. How to enable curl extension in php

1. Copy the three files php_curl.dll, libeay32.dll, ssleay32.dll under the PHP folder to system32 ;
2. Remove the semicolon from ;extension=php_curl.dll in php.ini (c:WINDOWS directory); 3. Restart Apache
or IIS.



4. Unable to load php_
mcrypt.dll, php_mysql.dll

Solution: Copy libmcrypt.dll, libmysql.dll to system32;

The above introduces the configuration of Apache+PHP+Mysql, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
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