- 论坛徽章:
- 0
|
php总是显示无法连接,而命令行是可以连接postgresql的,通过netstat -an |grep 5432 可以看到建立了连接
看到apache的日志文件有这么一行
[Tue Jan 02 11:59:36 2007] [notice] SELinux policy enabled; httpd running as context user_u:system_r:httpd_t:s0
而以前是没有的,怀疑是SELINUX选项除了问题,发现目前的选项是enforcing
发现是 SELINUX选项在搞鬼,修改成 disable就好了。
[root@dog conf.d]# cat /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted |
|