且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Mac OS X 上的文件 php.ini 配置

更新时间:2021-11-15 22:48:54

我使用带有 来自 josegonzales 的自制水龙头.

引用我的系统管理员朋友的话,答案应该在于重新启动 PHP-FPM 而不是 Apache.Apache 使用 mod_fastcgi 通过 PHP-FPM 运行 PHP 的端口或套接字连接到 PHP."

To quote my system administrator friend, "the answer should lie in restarting PHP-FPM instead of Apache. Apache uses mod_fastcgi to connect to PHP via a port or socket that PHP-FPM runs PHP with."

您需要加载/卸载与您的 PHP-FPM 关联的 p-list 文件安装.首先检查 ~/Library/LaunchAgents 不存在?我的位于这里:/usr/local/Cellar/php53/5.3.26/homebrew-php.josegonzalez.php53.plist

You need to load/unload the p-list file associated with your PHP-FPM install. First check ~/Library/LaunchAgents Not there? Mine was located here: /usr/local/Cellar/php53/5.3.26/homebrew-php.josegonzalez.php53.plist

它是这样重新启动的:

launchctl unload -w /usr/local/Cellar/php53/5.3.26/homebrew-php.josegonzalez.php53.plist && launchctl load -w /usr/local/Cellar/php53/5.3.26/homebrew-php.josegonzalez.php53.plist;

我将以下内容添加到我的 ~/.bash_profile 文件中,以便在重新启动 Apache 时可以重新启动 PHP-FPM.调用以下命令的命令是apachectlrestart"

I added the following to my ~/.bash_profile file so that I can restart PHP-FPM when I restart Apache. The command to invoke the following is "apachectlrestart"

function apachectlrestart () { sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist && sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist && launchctl unload -w /usr/local/Cellar/php53/5.3.26/homebrew-php.josegonzalez.php53.plist && launchctl load -w /usr/local/Cellar/php53/5.3.26/homebrew-php.josegonzalez.php53.plist;}

这是一个旧帖子,但我遇到了这个问题并在互联网上搜索无济于事,所以我在这里回答.