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.
ini file for each of the PHP versions present in MAMP. You can find it here (where “x.y.z” stands for the corresponding PHP version): “/Applications/MAMP/bin/php/phpx. y.z/conf/php. ini”.
This tutorial shows you how to set up PHP on the MAMP (Macintosh, Apache, MySQL, PHP) package, which includes the Apache web server, the MySQL database server, and the PHP engine. MAMP is intended as a PHP development environment for the Mac, which can work seamlessly with the NetBeans IDE.
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.
I'm not sure if in MAMP (non-PRO) is the same, but MAMP overrides the modified php.ini
everytime it starts.
In my case, I needed to use the MAMP menu to change my php.ini file
(File -> Edit Template -> PHP -> PHP 5.xx -> php.ini
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With