php开发环境配置记录

一般都是自己配置环境,为了方便在异地快速配置,总结一下,备忘.如果大家感觉麻烦可以一些php运行环境软件。例如phpnow等。就跟随本站小编一起去了解下吧,想了解更多相关信息请持续关注我们【apache安装】

php开发环境配置记录

复制代码 代码如下:

-k install -n "apache2.2.15"

-k start -n "apache2.2.15"

【apache卸载】

复制代码 代码如下:

-k stop -n "apache2.2.15"

-k uninstall -n "apache2.2.15"

【配置关键】

复制代码 代码如下:

ServerRoot "D:/APM/Apache2.2.15"

Listen 80

# 压缩发送给客户端的内容 gzip支持

#LoadModule deflate_module modules/mod_

# LoadModule cgi_module modules/mod_

# fastcgi

LoadModule fcgid_module modules/mod_

LoadModule rewrite_module modules/mod_

DocumentRoot "D:/APM/Apache2.2.15/htdocs"

# 支持 php 脚本

# fastcgi模式将此行注释

# 直接在虚拟主机中可配置每个站点使用不同版本的'php 或者不同的cgi

#Include conf/extra/

# Fancy directory listings 华丽的目录清单

Include conf/extra/

# Virtual hosts 虚拟主机

#Include conf/extra/

# fastcgi模式虚拟主机

Include conf/extra/

# Various default settings 页脚显示版本信息AccessFileName cess

Include conf/extra/

【参考】

复制代码 代码如下:

#

# 查找 /APM/php-5.2.12-Win32 替换

#

SetEnv PHPRC "/APM/php-5.2.12-Win32"

SetEnv TMP "/tmp"

# UnsetEnv PERL5LIB

# 加载dll省去在PATH中添加php路径

#LoadFile "/APM/php-5.2.12-Win32/"

LoadFile "/APM/php-5.2.12-Win32/"

LoadFile "/APM/php-5.2.12-Win32/"

LoadFile "/APM/php-5.2.12-Win32/"

LoadFile "/APM/php-5.2.12-Win32/"

LoadFile /APM/php-5.2.12-Win32/

#

# PHP-Module setup

#

LoadFile "/APM/php-5.2.12-Win32/"

LoadModule php5_module "/APM/php-5.2.12-Win32/php5apache2_"

SetHandler application/x-httpd-php

SetHandler application/x-httpd-php-source

# Load File Dir

PHPIniDir "/APM/php-5.2.12-Win32"

AddType text/html

【参考】

复制代码 代码如下:

NameVirtualHost *:80

#文档目录

DocumentRoot "/vhosts/localhost"

#名字 如

ServerName localhost

#别名 如

ServerAlias

#错误日志文件

ErrorLog "logs/lhost-error_log"

#目录访问规则

Options Indexes FollowSymLinks

AllowOverride All

Order allow,deny

Allow from all

#目录索引文件

DirectoryIndex

[html]

【参考】

[code]

#FcgidInitialEnv PHPRC "/APM/php5210"

#FcgidInitialEnv PATH "/APM/php5210;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"

#FcgidInitialEnv SystemRoot "C:/Windows"