php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22378 "sendmail_from" not set in php.ini or custom "From:" header missing
Submitted: 2003-02-22 15:18 UTC Modified: 2003-03-09 19:01 UTC
Votes:71
Avg. Score:3.7 ± 1.2
Reproduced:53 of 64 (82.8%)
Same Version:19 (35.8%)
Same OS:25 (47.2%)
From: kris at aethiamud dot org Assigned:
Status: No Feedback Package: Mail related
PHP Version: 4.3.0 OS: Windows XP
Private report: No CVE-ID: None
 [2003-02-22 15:18 UTC] kris at aethiamud dot org
Although I have found a few existing threads with this problem, none seem to address the core issue.  Basically, the "[mail function]" section of my php.ini file is NOT being read at all!  When a forum script I was using gave me an error when it tried to send an email to a newly registered user, I tried every solution I could think of, then every solution I could find at php.net and using google.  I then tried my phpinfo.php page (http://www.aethiamud.org/phpinfo.php), which basically just contains the line:

<?php
phpinfo();
?>


And this is what it listed for the mail function entries:

sendmail_from     no value   no value
sendmail_path     no value   no value 
SMTP              localhost  localhost 

I then checked my php.ini file (which is in my windows directory, properly named), and here is what it says:

[mail function]
; For Win32 only.
SMTP = smtp.aethiamud.org

; For Win32 only.
sendmail_from = info@aethiamud.org

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =


The only solution I could find related to the php.ini file somehow not being read at all.  That was my first thought, so I tested that theory by changing the 'register_globals' setting from 'off' to 'on', then I restarted the webserver and reloaded the phpinfo.php page.  Lo and behold, register_globals changed from 'off' to 'on'.  Therefore, the php.ini file IS in the right place, and it IS being read.  However, the [mail function] section does not appear to be.  My email server is configured and functioning properly, and works with the cgi-bin version of sendmail just fine, so that can't be it either.

I'm fresh out of ideas here!  Is this a bug, or just something that I'm not seeing?  Any help you could provide would be very much appreciated  :)

--Kris

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-22 16:06 UTC] msopacua@php.net
Two things:
1) does ini_set('SMTP', 'smtp.aethiamud.org'); work?

2) does the cli binary also not display these values? (run: path\to\cli\php -i)
 [2003-02-22 17:34 UTC] kris at aethiamud dot org
re:

1) Could you tell me how to do that ini_set thing?  I tried a few variations with the php/cli/php.exe command line, but couldn't figure out what you meant.

2) I did do the php/cli/php -i and it also displayed the same things; i.e. 'sendmail_from => no value => no value' and 'SMTP => localhost => localhost'
 [2003-02-22 17:39 UTC] kris at aethiamud dot org
Ok I just got what you meant after I hit submit hehe.  I tried adding that line to the phpinfo.php file, and now it lists the local value as smtp.aethiamud.org and the master value still as localhost.
 [2003-02-22 20:09 UTC] msopacua@php.net
Ok, then it looks like a parse problem, or you have a syntax error in your php.ini file or the settings are not passed through to the php core.

Try changing a setting _below_ the [mail function] section, like for instance: mysql.default_port to 4306.

Does that value change? Then we can strike the 'passed through' error.
 [2003-02-22 23:29 UTC] sniper@php.net
Just a note: I tested this with latest STABLE snapshot on my win2k machine and it works just fine..

 [2003-03-09 19:01 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2008-01-18 07:56 UTC] chaurasia151078 at hotmail dot com
hi
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 11:01:30 2024 UTC