Which php.ini file do I have to edit on Mountain Lion?
/etc/php.ini.default serves only as a reference and is not read out by PHP at all. The built-in PHP installation will look for the file /etc/php.ini instead. This file is not present by default, but you can copy /etc/php.ini.default to /etc/php.ini and make your modifications in there. You could also just create an empty file and only add any directives you want to change from the default.

Make sure you copy or create the file as root, so in Terminal you could do:

sudo cp /etc/php.ini.default /etc/php.ini

After modifying the php.ini, also make sure you restart Apache for the settings to take effect.

It is good practice to not modify /etc/php.ini.default directly, so you can use it as a reference if anything goes wrong with your /etc/php.ini.