Thanks moritz.
I am reading up on selinux now which seems to be enabled on my system, and might be a possible cause. The log file at /var/log/audit/audit.log shows the following entry among other
type=AVC msg=audit(1347964714.394:62458): avc: denied { name_connect } for pid=14917 comm="my_script.cgi" dest=3306 scontext=root:system_r:httpd_sys_script_t:s0 tcontext=system_u:object_r:mysqld_port_t:s0 tclass=tcp_socketIn reply to Re^2: CGI script connecting via terminal but not via browser
by nkrgupta
in thread CGI script connecting via terminal but not via browser
by nkrgupta
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |