"PHP" PHP Environment Integration

Source: Internet
Author: User

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

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.