MAMP在哪里保留其php.ini? [英] Where does MAMP keep its php.ini?

查看:287
本文介绍了MAMP在哪里保留其php.ini?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近有了一台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.同样,即使所有php.ini文件都已移动,MAMP都不会加载任何问题.在Lamp上,这甚至不会加载.但是或者我缺少另一个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.

推荐答案

注意:如果这没有帮助,请在下面查看里卡多·马丁斯的答案.

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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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