purmar
asked on
sendmail php.ini
Guys,
I googled the web all over, but nothing works. Here is my situation:
setting up website at first on my machine Winxp
php + apache
getting this
Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in c:\documents and settings\purmar\my documents\public_html\hrfo rm\hr_form .php on line 132
my php.ini:
; For Win32 only.
SMTP = crhgy.frf.net
smtp_port = 25
; For Win32 only.
sendmail_from = purmar@crhgy.com
the thing is that phpinfo has this values:
sendmail_from no value no value
sendmail_path no value no value
and
Configuration File (php.ini) Path C:\WINDOWS
there is no php.ini in windows, or in windows/system32
so I put php.ini all over and it still shows no value for sendmail in phpinfo.
can somebody tell me why this does not work and why info shows path to c:\windows when there isn't one and if is, then the values are not correct ...
thanks
purmar
I googled the web all over, but nothing works. Here is my situation:
setting up website at first on my machine Winxp
php + apache
getting this
Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in c:\documents and settings\purmar\my documents\public_html\hrfo
my php.ini:
; For Win32 only.
SMTP = crhgy.frf.net
smtp_port = 25
; For Win32 only.
sendmail_from = purmar@crhgy.com
the thing is that phpinfo has this values:
sendmail_from no value no value
sendmail_path no value no value
and
Configuration File (php.ini) Path C:\WINDOWS
there is no php.ini in windows, or in windows/system32
so I put php.ini all over and it still shows no value for sendmail in phpinfo.
can somebody tell me why this does not work and why info shows path to c:\windows when there isn't one and if is, then the values are not correct ...
thanks
purmar
Have you restarted your webserver after you copied your php.ini to the c:\windows directory?? The settings will only take effect after the restart of the webserver.
ASKER
Minichicken: as I indicated above I did set up SMTP. I got the seting from our network guy at work. It should be OK. Also, the sendmail from is set up for my email.
I think that I do have hidden files enabled, but will have to check (I am at home now). However, as I wrote above, I copied the PHP.INI to windows. I think that it would scream if it would overwrite the old one, even hidden (right?). As I mentioned I searched google and found even path to windows\system32 so I put there copy as well. Still, the phpinfo says that there is no senmail_from, no smtp and location of PHP.ini is in windows. That only is true, but with all the settings set up (SMTP, sendmail_from).
hernst42: I did restart webserver many times and no result...
thanks
purmar
I think that I do have hidden files enabled, but will have to check (I am at home now). However, as I wrote above, I copied the PHP.INI to windows. I think that it would scream if it would overwrite the old one, even hidden (right?). As I mentioned I searched google and found even path to windows\system32 so I put there copy as well. Still, the phpinfo says that there is no senmail_from, no smtp and location of PHP.ini is in windows. That only is true, but with all the settings set up (SMTP, sendmail_from).
hernst42: I did restart webserver many times and no result...
thanks
purmar
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you. It was looking in apache server directory at first, then windows. I put it again in windows and now it works!!! Not sure why the old file did not work.
purmar
purmar
First of all, the PHP.INI file should be in your C:\Windows and it a hidden file, so what you need to do is open windows explorer, TOOLS >> FOLDER OPTION >> VIEW tab >> enable Show hidden files and folders
and then you should be able to see the PHP.INI file in your Windows folder.
Open PHP.INI in an text editor. And set your SMTP server (You can use the one that you use for your domain that is provided by your hosting company) e.g. SMTP = smtp.mail_server.com
and for sendmail_from you can set what email address you like, as demostrated below
**************************
[mail function]
; For Win32 only.
SMTP = smtp.mail_server.com
; For Win32 only.
sendmail_from = me@example.com
Hope this works for you.....