By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,557 Members | 1,416 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,557 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
now.

Ben
Toronto, Canada
Aug 30 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.