Apache Web-Serving with Mac OS X: Part 3
Subject:   PHP.INI
Date:   2002-02-27 12:35:21
From:   kuacweb
OK, this is driving us crazy - in order to tell PHP where to route mail created with the mail() tag, you have to specify a SMTP server. Everything I've seen says this can be done in PHP.INI, which is the PHP configuration file. We can't find this file anywhere on our OsX box. It's a standard install. Anyone know where this is supposed to exist under OsX or what it might be called? Thanks!
Full Threads Oldest First

Showing messages 1 through 9 of 9.

    2003-06-29 08:00:18  anole [View]

    Well, shoot. Got PHP.INI to be read, and the mail variables set correctly. But now my sent mails from the php-based pMachine... instead of erroring like they did before, they just disappear into the ether.
    2002-03-02 06:14:16  kkohler [View]

    In the FAQ part of this website is written, that you have to create the php.ini in order to get mail() worked. For more information go to the website. Greetings Klaus
    • PHP.INI - correct path
      2002-04-26 18:34:51  lyle [View]

      Unfortunetly for me the Entropy site specifies a path (/usr/local/lib/php.ini) that did not work for my system (OSX.1.4) - the path that finaly worked is /usr/lib/php.ini

      Take a look at the output of a <?php phpinfo() ?> - item six (Configuration File) specifies where your instilation is looking for the php.ini file.
    • PHP.INI
      2002-03-04 08:46:45  kuacweb [View]

      Thanks! We tried it and it works, however, has anyone noticed a slow response on mail forms? Everything else seems very fast, PHP or not - but the mail forms can take up to 15-20 seconds even for a very simple form.
      • PHP.INI
        2002-05-30 10:20:56  mdar [View]

        Hi I'm just beginning with PHP, can someone tell me how to create a php.ini file either from OS 10.1.4 standard install or from Marc Liyanages

        • PHP.INI
          2003-06-03 04:02:12  anonymous2 [View]

          Do this:

          Make the directory first

          sudo mkdir -p /usr/local/lib

          Then make the file and restart apache

          sudo touch /usr/local/lib/php.ini

          and BiNgO you have a PHP.ini file ;-)
        • PHP.INI
          2003-03-20 14:47:19  anonymous2 [View]

          Hi Did you solve this problem
      • PHP.INI
        2002-04-09 12:19:16  pbljung [View]

        I created /usr/local/lib/php/php.ini containing
        [mail function]
        SMTP =
        sendmail_from =

        and restarted apache, but I still can't get mail() to work. Any tips?
        • PHP.INI
          2002-10-30 19:28:31  edwardd20 [View]

          Did you ever get your mail() function working? I'm trying the same thing and so far can't get it working. I have managed to get the sendmail to send a command directly, but when I try it with PHP and mail(), I get a message in /var/log/mail.log that reads gethostbyaddr( failed: 3. I do have the PHP.INI file as described above and my test.php script shows it being set properly.