[CentOS] Any SELinux gurus around?

Sat Jul 28 00:41:53 UTC 2007
Ray Van Dolson <rvandolson at esri.com>

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

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)?