Solutions for can't use mail() in php 4.3.11 in Redhat Fedora 3 when SElinux is enabled
- From: "Ben Xia" <ben@xxxxxxxxxx>
- Date: Tue, 30 Aug 2005 13:14:10 -0400
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
.
- Prev by Date: Re: Exceptions
- Next by Date: Re: Séé of the files on a server (Was Re: Séé des fichiers sur un serveur)
- Previous by thread: php5+postgresql hosting
- Next by thread: PHP Web Application "Job Hunter" Updated And Available
- Index(es):
Relevant Pages
|