php开发环境配置记录

2019-04-09 11:40:08王振洲


xcache.cacher = On
xcache.stat = On
xcache.optimizer = Off

[xcache.coverager]

; 如果 xcache.coveragedump_directory 设置为空则本设置自动为 Off
xcache.coverager = Off

; 请确保本目录能被 coverage viewer 脚本读取 (注意 open_basedir)
; 依赖于 xcache.coverager=On
xcache.coveragedump_directory = ""

[Xdebug]
xdebug.var_display_max_depth = 10
;xdebug.remote_autostart = 1
;xdebug.remote_enable=1
;xdebug.remote_handler=dbgp
;xdebug.remote_host=127.0.0.1
;xdebug.remote_mode=req
;xdebug.idekey=default
;xdebug.remote_log="/xdebug.log"
;xdebug.remote_port=9000
xdebug.auto_trace=off
;xdebug.collect_params=on
;xdebug.collect_return=on
xdebug.trace_output_dir="/tmp/xdebug"
xdebug.profiler_enable=off
xdebug.profiler_output_dir="/tmp/xdebug"
;zend_extension_ts="/APM/ext/xdebug/php_xdebug-2.0.5-5.2.dll"
;zend_extension="/APM/ext/xdebug/php_xdebug-2.0.5-5.2-nts.dll"
zend_extension="/APM/ext/xdebug/php_xdebug-2.1.0beta3-5.2-vc6-nts.dll"

【IIS ISAPI】

添加环境变量 PHPRC=D:PHP 这个是通知iis读取php.ini文件的路径。
在PATH中加入 D:PHP 能读取相关动态链接库。
添加一个新的web服务扩展 php d:phpphp5isapi.dll
添加应用程序扩展名映射 可执行文件 d:phpphp5isapi.dll 扩展名.php
重启IIS php就可以用了。

【IIS FastCGI PHP】

这个不用添加环境变量和修改PATH变量。
先安装FastCGI,安装程序会自动添加
Web 服务扩展 - FastCGI Handler
c:windowssystem32inetsrvfcgiext.dll
并设置为允许。
修改c:windowssystem32inetsrvfcgiext.ini
[Types]
php=PHP
[PHP]
ExePath=D:phpphp-cgi.exe
InstanceMaxRequests=10000
EnvironmentVars=PHP_FCGI_MAX_REQUESTS:10000
添加应用程序扩展名映射 可执行文件 c:windowssystem32inetsrvfcgiext.dll 扩展名.php
重启iis就行了。

【ISAPI_Rewrite 参考】

RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} ^03188.net [NC]
RewriteRule ^(.*)$ http://www.03188.net/$1 [L,R=301]

#### RewriteCond %{REQUEST_URI} ^[A-Z]{3,9} /index.php HTTP /
# RewriteRule ^index.(php|htm|html)$ http://www.03188.net/ [R=301,L]

RewriteRule ^([a-z]+)/(.*)/(.*)/(.*).htm$ index.php?action=$1&option=$2&extent=$3&info=$4 [L]
RewriteRule ^([a-z]+)/(.*)/(.*).htm$ index.php?action=$1&option=$2&extent=$3&info=$3 [L]
RewriteRule ^([a-z]+)/(.*).htm$ index.php?action=$1&option=$2 [L]
RewriteRule ^([a-z]+).htm$ index.php?action=$1 [L]

# RewriteRule ^(.*).asp$ http://www.03188.net [L,R=301]
# 修改完整模式下被抓取的url使有效
# RewriteRule ^index.php/([a-z]+)/(.*)/(.*).htm$ $1/$2/$3.htm [L,R=301]
# RewriteRule ^index.php/([a-z]+)/(.*).htm$ $1/$2.htm [L,R=301]

# 修改论坛移动后出现No input file specified.
# RewriteRule ^bbs/(.*)$ http://bbs.03188.net/$1 [L,R=301]
相关文章 大家在看