FastCGI模式运行PHP的话就没有必要用线程安全检查了,用None Thread Safe(NTS,非线程安全)
ISAPI的方式来运行PHP就必须用Thread Safe(线程安全)
VC6 版本是使用 Visual Studio 6 编译器编译的,如果你的 PHP 是用 Apache 来架设的,那你就选择
VC9 版本是使用 Visual Studio 2008 编译器编译的,如果你的 PHP 是用 IIS 来架设的,那你就选择
fastcgi配置
php.ini指定docroot——php文件的存放目录,即你的documentroot。doc_root = “e:\www”
扩展存放目录 extension_dir——更改为真实的扩展存放地址。extension_dir = “./ext”
默认时区更改——在[Date]里面增加:
date.timezone = PRC,Asia/Chongqing ,Asia/Shanghai ,Asia/Urumqi
因为nginx需要的是cgi方式的php,所以如下几个地方是重点,否则nginx无法打开php文件:
enable_dl = On
cgi.force_redirect = 0
cgi.fix_pathinfo=1
fastcgi.impersonate = 1
cgi.rfc2616_headers = 1
php.iniupload_tmp_dir = 上传临时目录
register_globals = Off”关闭全局变量
short_open_tag = On,支持短标签
session.save_path = "/tmp" 配置session文件在服务器上的保存目录
apache
PHPIniDir "D:/php/php5"
DirectoryIndex index.php default.php
AddType application/x-httpd-php .php
LoadModule php5_module "d:/wamp/bin/php/php5.3.5/php5apache2_2.dll"
php.ini搜索路径的先后
a) SAPI 模块所指定的位置(Apache 2 中的 PHPIniDir 指令,CGI 和 CLI 中的 -c 命令行选项,NSAPI 中的 php_ini 参数,THTTPD 中的 PHP_INI_PATH 环境变量)
b) HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath(Windows 注册表位置)
c) PHPRC 环境变量
d) 当前工作目录(对于 CLI)
e) web 服务器目录(对于 SAPI 模块)或 PHP 所在目录(Windows 下其它情况)
f) Windows 目录(C:\windows 或 C:\winnt),或 --with-config-file-path 编译时选项指定的位置
', '
FastCGI模式运行PHP的话就没有必要用线程安全检查了,用None Thread Safe(NTS,非线程安全)
ISAPI的方式来运行PHP就必须用Thread Safe(线程安全)
VC6 版本是使用 Visual Studio 6 编译器编译的,如果你的 PHP 是用 Apache 来架设的,那你就选择
VC9 版本是使用 Visual Studio 2008 编译器编译的,如果你的 PHP 是用 IIS 来架设的,那你就选择
fastcgi配置
php.ini指定docroot——php文件的存放目录,即你的documentroot。doc_root = “e:\www”
扩展存放目录 extension_dir——更改为真实的扩展存放地址。extension_dir = “./ext”
默认时区更改——在[Date]里面增加:
date.timezone = PRC,Asia/Chongqing ,Asia/Shanghai ,Asia/Urumqi
因为nginx需要的是cgi方式的php,所以如下几个地方是重点,否则nginx无法打开php文件:
enable_dl = On
cgi.force_redirect = 0
cgi.fix_pathinfo=1
fastcgi.impersonate = 1
cgi.rfc2616_headers = 1
php.iniupload_tmp_dir = 上传临时目录
register_globals = Off”关闭全局变量
short_open_tag = On,支持短标签
session.save_path = "/tmp" 配置session文件在服务器上的保存目录
apache
PHPIniDir "D:/php/php5"
DirectoryIndex index.php default.php
AddType application/x-httpd-php .php
LoadModule php5_module "d:/wamp/bin/php/php5.3.5/php5apache2_2.dll"
php.ini搜索路径的先后
a) SAPI 模块所指定的位置(Apache 2 中的 PHPIniDir 指令,CGI 和 CLI 中的 -c 命令行选项,NSAPI 中的 php_ini 参数,THTTPD 中的 PHP_INI_PATH 环境变量)
b) HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath(Windows 注册表位置)
c) PHPRC 环境变量
d) 当前工作目录(对于 CLI)
e) web 服务器目录(对于 SAPI 模块)或 PHP 所在目录(Windows 下其它情况)
f) Windows 目录(C:\windows 或 C:\winnt),或 --with-config-file-path 编译时选项指定的位置