It has not been installed for a long time and has been re-installed today. Encountered a lot of problems. Record it for easy viewing later
Modify the Apache configuration file httpd.conf
#apache parsing PHP
LoadFile "c:/phpeve/php52/libmysql.dll" Load DLL file. No need to put the file into the System32 folder
LoadModule php5_module "C:/phpeve/php52/php5apache2_2.dll"
Phpinidir "C:/phpeve/php52/php.ini" to php.ini file directory
AddType application/x-httpd-php. php
AddType application/x-httpd-php. htm
Apache Virtual Host Configuration
Namevirtualhost *:80
<virtualhost *:80>
#站点根目录
DocumentRoot "d:/www/"
#绑定域名
ServerName www.xxx.net
#配置错误页面和错误日志
ErrorDocument 404/missing.html
Errorlog "Logs/www.xxxx.com-error.log"
</VirtualHost>
#配置网站目录访问权限
<directory "d:/www/" >
Options FollowSymLinks execcgi
AllowOverride All
Order Allow,deny
Allow from all
</Directory>
#配置301重定向
<virtualhost *:80>
ServerName xxx.net
Redirectmatch permanent ^/(. *) http://www.xxx.net/$1
</VirtualHost>
Configuration of the PHP.ini
Configure the path to ext.
Extension_dir = "c:/phpeve/php52/ext/"
Open the corresponding expansion library
Extension=php_bz2.dll
Extension=php_curl.dll
Extension=php_mysql.dll
Extension=php_mysqli.dll
Extension=php_mbstring.dll
Extension=php_mcrypt.dll
Extension=php_pdo.dll
Extension=php_pdo_mysql.dll
Setting the time zone
Date.timezone =PRC
Set encoding
Default_charset = "Utf-8"
Configure session
Session.save_handler = Files Session storage mode file
Session.save_path = "C:/tmp"//session storage Path
Session.name = Name of PHPSESSID session name
Configure upload
File_uploads = on allows file upload
Upload_tmp_dir = "c:/temp/"
Upload_max_filesize = 2M size of uploaded file