Connecting to MySQL server with FQDN under lighttpd (via PHP) fails
Added by Suzaku almost 15 years ago
I'm trying to connect to a remote MySQL server with PHP under lighttpd and failing.
The linked PHP code works if I set $server to 'localhost', but not if I use the fully-qualified domain name (FQDN) that corresponds to 'localhost' or the FQDN of a remote MySQL server. (Note: the code works with and without FQDNs when run from the command line.)
PHP: http://paste.lighttpd.net/350
OS: CentOS 5.2 (x86_64)
lighttpd: 1.4.22 (x86_64)
config: http://paste.lighttpd.net/349
Should I be paying attention to any special options in lighttpd.conf? (I'm guessing it has something to do with not finding /etc/resolving.conf after chroot'ing, but I have no idea how to test--or fix--that.)
Thanks,
Steven
Replies (1)
RE: Connecting to MySQL server with FQDN under lighttpd (via PHP) fails - Added by Suzaku almost 15 years ago
Problem solved: setsebool -P httpd_can_network_connect true