如何在Mac OS X Mojave上更新php.ini? [英] How update php.ini on a Mac OS X Mojave?

查看:116
本文介绍了如何在Mac OS X Mojave上更新php.ini?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Mac OS X Mojave上

I'm on Mac OS X Mojave

第1步

我跑了

php -i | grep php.ini

我知道了

Configuration File (php.ini) Path => /usr/local/php5/lib
Loaded Configuration File => /usr/local/php5/lib/php.ini

第2步

我打开ini文件

vi /usr/local/php5/lib/php.ini , 

and update memory_limit to -1 

第3步

我跑了

php -i | grep memory_limit

我知道了

memory_limit => 256M => 256M                                                                                      

第4步

我重新启动

sudo apachectl -k restart

并输入我的密码

并尝试

php -i | grep memory_limit

再次,我还是

memory_limit => 256M => 256M                                                                                      

好像我的旅行从未生效...

Seems like my chages never take any effect ...

我需要在Mac上启动任何服务吗?如果是这样,执行什么命令?

Do I need to start any service on a Mac? If so, what command to do that?

phpinfo

推荐答案

答案很简单.

您编辑的PHP INI文件与Apache服务器中加载的INI文件不同.

The PHP INI file which you have edited and the INI file that is loaded in Apache server is different..

您必须在apache httpd.conf文件中更新PHP加载程序.

You have to update the PHP loader in the apache httpd.conf file.

之后,使用sudo apachectl restart重新启动apache服务器.

After that restart the apache server with sudo apachectl restart.

最后,现在您可以使用phpinfo();

Finally, now you can test the PHP ini file loaded in apache2 with phpinfo();

这篇关于如何在Mac OS X Mojave上更新php.ini?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆