Apache 在 Windows 上支持 PHPIniDir 吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2816704/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 14:26:51  来源:igfitidea点击:

Does Apache support PHPIniDir on windows?

phpwindowsapache

提问by wamp

PHPIniDir "D:/Dev/PHP/"

The above instruction can make my apache die on windows.

上面的指令可以让我的 apache 在 windows 上死掉。

But I'm just not sure if that's true.

但我不确定这是否属实。

BTW,I found xmpp/wampserver copies the php.ini to the directory of httpd.exe,maybe for the lack of support?

顺便说一句,我发现 xmpp/wampserver 将 php.ini 复制到 .ini 目录httpd.exe,可能是因为缺乏支持?

回答by wimvds

Short answer : yes, Apache does support PHPIniDir on Windows.

简短回答:是的,Apache 确实支持 Windows 上的 PHPIniDir。

One thing you probably should look out for is whether the path to your extensions is correctly set in the php.ini you use, because if it's not Apache will not start. And if Apache doesn't start, then checking your Apache error log could be helpful to find the cause.

您可能应该注意的一件事是在您使用的 php.ini 中是否正确设置了扩展的路径,因为如果不是,Apache 将不会启动。如果 Apache 没有启动,那么检查 Apache 错误日志可能有助于找到原因。