PHP Warning:  pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Permission denied\n\tIs the server running on host «localhost» and accepting\n\tTCP/IP connections on port 5432?\ncould not connect to server: Permission denied\n\tIs the server running on host «localhost» and accepting\n\tTCP/IP connections on port 5432? in /var/www/html/index.php on line 2

PHP Warning:  pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Permission denied\n\tIs the server running on host «localhost» and accepting\n\tTCP/IP connections on port 5432?\ncould not connect to server: Permission denied\n\tIs the server running on host «localhost» and accepting\n\tTCP/IP connections on port 5432? in /var/www/html/index.php on line 2

 

El problema radica en nuestra configuracion de SELINUX para cambiarlo debemos verificarlo con

 

/usr/sbin/sestatus | grep SELinux
SELinux status: enabled
SELinuxfs mount: /selinux

 

Como esta enable entramos en el fichero de configuracion /etc/selinux/config para dejarlo deshabilitado en el proximo reinicio debemos cambiar

 

SELINUX=enable
por
SELINUX=disabled

 

 

Y para actualizarlo en nuestra sesion actual

 

setenforce 0

Listo ya nos conectara nuestro fichero en php contra postgresql

Por admin

Deja una respuesta

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
100% Free SEO Tools - Tool Kits PRO