IIS configuration

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I'm trying to get a PHP script that sends an email working.  I have
modified the php.ini file to include the proper values for SMTP =,
smtp_port=, and sendmail_from=.  However, when I try to send mail using
the script, I get 'Failed to connect to mailserver at "localhost" port
25, verify your "SMTP" and "smtp_port" setting in php.ini or use
ini_set() in....".  I have an actual server name specified for SMTP=,
but it seems almost as if the server isn't reading the php.ini file.
As a test, I included the ini_set(SMTP, xxxx) and
ini_set(sendmail_from, xxxx) in the php script itself, and the mail
worked.  Unfortunately, we have hundredes of scripts, and I don't fancy
the idea of changing them all.  Why isn't the setting in php.ini



Re: IIS configuration

Well, there's nothing like posting a question asking for help to make
the answer appear.  I was under the impression that the php.ini file
had to be in c:\php, but when I ran the test.php script, it told me it
was looking in c:\windows.  I copied the php.ini to c:\windows and now
everything works fine.

Site Timeline