LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-21-2010, 11:08 AM   #1
bombshell
LQ Newbie
 
Registered: Dec 2010
Distribution: Fedora 14, Ubuntu 10.10, OpenSUSE 11.3
Posts: 13

Rep: Reputation: 0
Red face PHP mail() cease to work


I'm shell admin of http://bombshellnet.org and I'm in charge of the site. I was writing new code and testing it on the server when I encountered a unusual issue, mail() just cease to work without any useful explanation to as why. I've increase debug level in HTTPD, Postfix, and in PHP but no errors relating to this issue are logged. There's no indication in Postfix that PHP within Apache is making any attempts to send Mail. I've tested the Postfix with my E-Mail client, Telnet, and sendmail and all have passed. I test sample code on the cli with PHP and that has also passed. However, within Apache this test fails. I would include logs but there aren't any useful information. I read on another forum that this might be related to PHP misconfiguration of the send mail binary, but that's not the case as I double checked for accuracy. I'm not sure if anyone can provide helpful hints to this issue without much data to go on but I'm asking at anyrate. Anyone have any ideas?
 
Old 12-21-2010, 11:37 AM   #2
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
Did you recently upgrade or update your PHP? It was a couple of months ago, but I recall something about mail getting broken in php5.3. It may have been Ubuntu related, but I am not certain. I recall the problem because I upgraded and could no longer send mail on the development/test PC I was using and I ended up downgrading the package.
 
Old 12-21-2010, 12:47 PM   #3
bombshell
LQ Newbie
 
Registered: Dec 2010
Distribution: Fedora 14, Ubuntu 10.10, OpenSUSE 11.3
Posts: 13

Original Poster
Rep: Reputation: 0
Unfortunately, we currently using Fedora 14 and they only have the latest PHP 5.3.3 in the Repos. At this point, we don't have any other information to go on, I'm going to submit a bug. I'm not sure what I've done specifically for the function to cease working since it worked a couple of days ago :\
 
Old 12-21-2010, 12:55 PM   #4
Dani1973
Member
 
Registered: Dec 2010
Distribution: Debian testing
Posts: 148

Rep: Reputation: 16
Are the setting in php.ini correct ???

I had the same problem once, everything just worked and then after a upgrade it suddenly stopped working and I had to correct my php.ini
 
Old 12-21-2010, 01:33 PM   #5
bombshell
LQ Newbie
 
Registered: Dec 2010
Distribution: Fedora 14, Ubuntu 10.10, OpenSUSE 11.3
Posts: 13

Original Poster
Rep: Reputation: 0
I removed PHP and reinstalled it with the default settings and still no go. It has to be something up with Apache... :/ I'm going to try one more thing and see....
 
Old 12-21-2010, 01:36 PM   #6
bombshell
LQ Newbie
 
Registered: Dec 2010
Distribution: Fedora 14, Ubuntu 10.10, OpenSUSE 11.3
Posts: 13

Original Poster
Rep: Reputation: 0
Here is a bug report that I submitted to fedora: https://bugzilla.redhat.com/show_bug.cgi?id=664825 .... I even upgraded to testing PHP 5.3.4 and still no go =]
 
Old 12-21-2010, 01:56 PM   #7
bombshell
LQ Newbie
 
Registered: Dec 2010
Distribution: Fedora 14, Ubuntu 10.10, OpenSUSE 11.3
Posts: 13

Original Poster
Rep: Reputation: 0
After screwing around, I found out that php has a mail.log feature. I enabled it and got this:

Quote:
mail() on [/var/www/html/mail.php:9]: To: bombshell@bombshellnet.org -- Headers:
 
Old 12-21-2010, 02:26 PM   #8
bombshell
LQ Newbie
 
Registered: Dec 2010
Distribution: Fedora 14, Ubuntu 10.10, OpenSUSE 11.3
Posts: 13

Original Poster
Rep: Reputation: 0
Alright, I retrieve a script which I modified http://www.howtoforge.com/how-to-log...tect-form-spam and have it logged when it's called. PHP is not calling the script at all nor do I see sendmail errors in /var/log/maillog
 
Old 12-21-2010, 03:11 PM   #9
bombshell
LQ Newbie
 
Registered: Dec 2010
Distribution: Fedora 14, Ubuntu 10.10, OpenSUSE 11.3
Posts: 13

Original Poster
Rep: Reputation: 0
Alright, this issue has been solved. Took me nearly 8 hours to fix but the issue was created by me in attempt to lock down bash. I prevented Apache from running shell commands. After scoring the web with helpful tips that guided me to this issue, I don't how know I could think google.com and linux questions. Hopefully this can be helpful for the next person =]
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP - Mail.php and Mail/mime.php issues LVsFINEST Linux - Server 1 02-08-2009 05:44 PM
Making smtp and php mail() functions work on Linux9 rajnair0278 Linux - Software 0 05-12-2006 06:25 AM
PHP Mail() function doesn't work Messiadbunny Linux - Software 4 06-11-2005 04:40 AM
How does the mail function work(PHP) Alexander.s Programming 1 05-15-2005 09:02 AM
Cannot get PHP mail() to work. jc materi Linux - Networking 4 01-19-2005 06:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration