Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
450 views
in Technique[技术] by (71.8m points)

macos - Where does MAMP keep its php.ini?

I have recently got a mac an am not used to developing on a mac at all.

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

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.

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Note: If this doesn't help, check below for Ricardo Martins' answer.


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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share

2.1m questions

2.1m answers

62 comments

56.6k users

...