Solutions for can't use mail() in php 4.3.11 in Redhat Fedora 3 when SElinux is enabled

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

Looks like this is a common issue:

If you installed linux Fedora 3 with the default configuration and latest  
patches, you will have Apache/2.0.53 (Fedora) and PHP 4.3.11 in your box.

Without any change you can use sendmail, that means you can use mail under  
Terminal, but probably you can not use mail() in php.

The error message in maillog will looks like:
"SYSERR(APACHE), Can't write, ... Permission denied."

I spent several days to search Google and manual, no result. With the help  
of lvaro G. Vicario in this group, the solution is SELinux. Simply disable  
SELinux or Check the "Disable SELinux protection for httpd daemon" in  
SElinux config solves the problem within 1 second.

Thanks Alvaro.

Not sure if this will effect FC4 or not. I remember the php mail() works in  
my FC4(php5), but I can not remember during the linux install did I disable  
the SELinux or not. But looks like this is SELinux thing not PHP's so the  
version of PHP will not effect this. I have deleted the FC4 so I can not try  

Toronto, Canada  

Site Timeline