[CentOS] Any SELinux gurus around?
Leonel
lnunez at gmail.com
Sat Jul 28 01:28:24 UTC 2007
On 7/27/07, Ray Van Dolson <rvandolson at esri.com> wrote:
> Hey all, I'm having some trouble getting PHP5 w/ CentOS 5 to connect to
> a remote MySQL server using the standard mysql_connect() call.
>
> Yes, MySQL libraries are installed along with php-mysql...
>
> The only way I can get it to work is to run setenforce Permissive,
> otherwise the connection fails.
>
> The annoying thing is that nothing at all shows up in my
> /var/log/messages file describing why SELinux is stopping this
> connection.
>
> If I run my script with the CLI php binary, it connects to the remote
> server fine, just not when executed via httpd.
>
> I tried running the following on my PHP script:
>
> chcon -u system_u -t httpd_sys_content_t test.php
>
> But still I cannot complete a connection until I put SELinux back in
> Permissive mode.
>
> Any tips? Why isn't SELinux sending a message to the logs (it does for
> other SElinux issues just fine)?
>
> TIA,
> Ray
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
try with
setsebool -P httpd_can_network_connect true
and put SELinux to enforcing
--
Leonel
More information about the CentOS
mailing list