问题描述
我最近买了一台 mac,完全不习惯在 mac 上开发.
I have recently got a mac an am not used to developing on a mac at all.
我有 MAMP Pro 1.9.6.1.我在 php.ini
上做了一个定位,得到了这个:
I have MAMP Pro 1.9.6.1. I did a locate on php.ini
and got this:
$ locate php.ini
/Applications/MAMP/conf/php5.2/php.ini
/Applications/MAMP/conf/php5.3/php.ini
/Library/Application Support/appsolute/MAMP PRO/conf/php.ini
/private/etc/php.ini.default
我改变了他们所有人的名字.重新启动 MAMP.它顺利加载(我知道奇怪吗?).我使用的是 PHP 5.2 版.
I changed the name of all of them. Restarted MAMP. It loaded without a hitch (I know odd right?). I am using PHP version 5.2.
所有这些文件现在都是不同的名称(为消除过程一一完成).所以我想重启mac.同样,MAMP 加载没有问题,即使所有 php.ini
文件都已移动.在灯上,这甚至不会加载.但是要么我缺少另一个 php.ini
文件(很可能我不知道如何updatedb
),MAMP 真的很聪明,只是把所有的他们(不太可能)或者它不使用一个.
All of these files are now different names (done one by one for process of elimination).So I figure restart the mac. Same, MAMP loaded no problems, even though all of the php.ini
files had been move. On Lamp this that wouldn't even load. But either there is another php.ini
file I'm missing (quite possible I don't know how to updatedb
), MAMP is really intelligent and just pulls in all of them (less likely) or it doesn't use one.
推荐答案
注意:如果这没有帮助,请查看下面的 Ricardo Martins 的回答.
Note: If this doesn't help, check below for Ricardo Martins' answer.
创建一个包含 <?php phpinfo() ?>
的 PHP 脚本,从浏览器中运行该脚本,然后查找值 Loaded Configuration File
.这会告诉您 PHP 在 Web 服务器上下文中使用的是哪个 php.ini
文件.
Create a PHP script with <?php phpinfo() ?>
in it, run that from your browser, and look for the value Loaded Configuration File
. This tells you which php.ini
file PHP is using in the context of the web server.
这篇关于MAMP 将其 php.ini 保存在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!