the role of php.ini

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

Threaded View
Could someone enlighten me on the role of php.ini file?
I test mail("", "My Subject", "Line 1\nLine 2\nLine
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
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
Is this correct?

Re: the role of php.ini

aa wrote:

Quoted text here. Click to load it



Site Timeline