【发布时间】:2015-01-18 12:04:48
【问题描述】:
有没有办法为 apache 设置一个位置来读取自定义 php.inis?目前它说“Scan this dir for additional .ini files”为“(none)”
环境为 CentoOS 6、Apache 2、PHP 通过 DSO 运行
【问题讨论】:
标签: php apache centos6 ini server
有没有办法为 apache 设置一个位置来读取自定义 php.inis?目前它说“Scan this dir for additional .ini files”为“(none)”
环境为 CentoOS 6、Apache 2、PHP 通过 DSO 运行
【问题讨论】:
标签: php apache centos6 ini server
Scan directories for .ini 文件是在编译时通过--with-config-file-scan-dir 选项配置的。
但是对于来自v5.2.0 的更高版本的PHP,您可以通过设置PHP_INI_SCAN_DIR 环境变量在运行时覆盖它。
您可以在服务器配置、虚拟主机、目录或.htaccess 文件的上下文中使用SetEnv directive 来更新此值。
SetEnv PHP_INI_SCAN_DIR /usr/local/opt/php-extras
【讨论】: