我遇到了一个奇怪的问题与PHP配置文件php.ini在Mac-OS-X。我已经创建了一个phpinfo文件。在浏览器中调用它会显示PHP设置-
配置文件(php.ini)路径: /etc
加载的配置文件: /private/etc/php.ini
但是,在编辑此位置的php.ini文件时(当然是重启Apache ),更改不会反映在PHP设置和phpinfo文件中。
例如:更改bcmath十进制数字、更改时区设置等。Apache是否会从另一个主要位置获取设置文件?
发布于 2017-05-13 14:38:50
Jeremy John's answer帮助我解决了这个问题。
问题:
'Loaded configuration file'在phpinfo()输出中显示'/usr/local/etc/php/7.0/php.ini',并且我的模块(imagick)没有被加载。'Loaded configuration file'没有更新。php.ini重命名为php.ini_并重新启动Apache,但'Loaded configuration file'仍然显示旧的php.ini文件。解决方案:
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.php70.plistlaunchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php70.plist启动函数下一步,我在~/.bash_profile中设置快捷方式函数重启php-fpm函数restart_fpm(){ plist=~/Library/LaunchAgents/homebrew.mxcl.php70.plist
~/.bash_profile -w $plist -w set load $plist $plist "PHP 7 fpm restarted“}source ~/.bash_profile将新函数加载到当前外壳程序中
发布于 2012-03-16 15:20:53
从服务面板重新启动Apache HTTP Server服务器将反映您所做的新更改...
https://stackoverflow.com/questions/9733342
复制相似问题