470,874 Members | 1,596 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,874 developers. It's quick & easy.

the role of php.ini

aa
Could someone enlighten me on the role of php.ini file?
I test mail("ad*****@yahoo.com", "My Subject", "Line 1\nLine 2\nLine
3","From: ad*****@yahoo.com")
which produces error:
Warning: mail(): Failed to connect to mailserver at "localhost" port 25,
verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()

I am trying to play with relevant settings in php.ini
SMTP = localhost
SMTP_PORT = 25
SENDMAIL_FROM = NULL
SENDMAIL_PATH = H:\WINNT\system32\sendmail.dll
re-booting the PC every time, but changes do not seem to affect the error.

If I delete everything from php.ini the code which extract data from
database and displays it still works, but mail() produces a different error

Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header
missing in ...

Same error happens if I rename php.ini

It looks like PHP works without php.ini and takes some default settings from
elsewhere
Is this correct?



Jul 17 '05 #1
1 1799
aa wrote:
It looks like PHP works without php.ini and takes some default settings from
elsewhere
Is this correct?


Yes.

Regards,
Matthias
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by tracy | last post: by
2 posts views Thread by Jesper Stocholm | last post: by
1 post views Thread by Hennie | last post: by
8 posts views Thread by Mark White | last post: by
4 posts views Thread by cybertoast | last post: by
6 posts views Thread by perplexed | last post: by
2 posts views Thread by Anthony Smith | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.