Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Based on the information of mail function in php, it says that a setting of sendmail_path has to be set in php.ini. I tried to search for this php.ini file. I could not find it. Not sure it is in a difference file or something else I don't know.

I tried to call mail function in a test php file in my local Sites. Nothing happened. I guess it is mail configuration issue in my local php. How should this to be set? Any detail information for Mac?

I am using Snow Leopard. The phpinfo() displays the version is PHP Version 5.3.0. I cannot see any mail configuration from the result. Not sure if there is way to see the mail configuration from a php page?

share|improve this question

This page tells where the php.ini file should be located.

If you load phpinfo.php in your browser it should show the current setting of sendmail_path.

You will need to have a working mail transport agent (e.g. sendmail).

share|improve this answer

Actually, I don't have php.ini file in my local iMac. From the phpinfo(), what I found is that the default mail configuration settings are:

SMTP = localhost
sendmail_path = /usr/sbin/sendmail -t -i
smtp_port = 25
sendmail_from = no value

And on the top of phpinfo() result, what I found about configuration is:

Configuration File (php.ini) Path: /etc

in /etc I found php.ini.default file and another one php.ini.default-5.2-previous. If I need to change settings of php config, I have to make a copy of the default file as php.ini in /etc and make changes as sudo.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.