urano68 Posted December 9, 2019 Posted December 9, 2019 (edited) I have the error of not being able to connect to the database, locally I connect but from my server I have not been able to, I have read about it and they tell me that it is problems of php extensions with postgresql Edited December 9, 2019 by urano68
vanisk Posted December 9, 2019 Posted December 9, 2019 Please mention 1)Server Name2)PHP version3)PHP extensions to be installed
urano68 Posted December 9, 2019 Author Posted December 9, 2019 1 Johnny 2 7.3 3 php_pdo_pgsql - php_pgsql
urano68 Posted December 9, 2019 Author Posted December 9, 2019 this is the error that shows: Fatal error: Uncaught Error: Call to undefined function pg_connect() in /home/urano68/public_html/servicios.digitales/configuracion/conexion.php:2
Luigi123 Posted December 9, 2019 Posted December 9, 2019 This support request is being escalated to our root admin.
Krydos Posted December 10, 2019 Posted December 10, 2019 The extension pgsql has been installed on Johnny's php 7.3.
urano68 Posted December 10, 2019 Author Posted December 10, 2019 Good morning, thank you very much come and check and the error does not come out. Very kind for the attention
urano68 Posted December 10, 2019 Author Posted December 10, 2019 Good morning, thank you very much come and check and the error does not come out. Very kind for the attention
urano68 Posted December 10, 2019 Author Posted December 10, 2019 Now I have problems with this error: Host= localhost; DBname= taxis; User= postgres; Password= postgres Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: password authentication failed for user "postgres" in /home/urano68/public_html/servicios.digitales/configuracion/conexion.php on line 3 I think that for to fix this error open PostgreSQL client authentication configuration file pg_hba.conf By default Postgresql uses IDENT-based authentication. All you have to do is allow username and password based authentication for your network or webserver. IDENT will never allow you to login via -U and -W options. Append following to allow login via localhost only: local all all trusthost all 127.0.0.1/32 trust
Krydos Posted December 11, 2019 Posted December 11, 2019 Your user isn't postgres, it is the user you create through cpanel that starts with urano68_.
urano68 Posted December 13, 2019 Author Posted December 13, 2019 (edited) Annex I send you what is in the PostgreSql cPanel, database and user database and the php code of my application, thanks for what you can help me. User: urano68_postgres Database: urano68_taxis php <?php $sis_titulo=""; $sis_estilo=""; $sis_charset="utf-8"; $sis_oficina="001"; $sis_proyecto=""; $bd_servidor="localhost"; $bd_puerto="5432"; $bd_nombre="taxis"; $bd_usuario="urano68_postgres"; $bd_clave="postgres"; ?> Edited December 13, 2019 by urano68
urano68 Posted December 13, 2019 Author Posted December 13, 2019 (edited) Thank You Krydos I could solve the error, it is because of the prefix that you have to put to the database and the user, with the data that you wrote to me, I did it with both parameters and I already have access to the database, thank you very much for your help and patience I could solve the error, it is because of the prefix that you have to put to the database and the user, with the data that you wrote to me, I did it with both parameters and I already have access to the database, thank you very much for your help and patience Edited December 13, 2019 by urano68
urano68 Posted December 13, 2019 Author Posted December 13, 2019 Again, here, I already connected to the database, but now I have an error wanting to inert data in a table Warning: pg_query(): Query failed: ERROR: permission denied for relation usuarios I hope you can help me, I don't know if I can solve that error with the phpPgadmin or that is done from the server?
Guest pooks Posted December 13, 2019 Posted December 13, 2019 Again, here, I already connected to the database, but now I have an error wanting to inert data in a table Warning: pg_query(): Query failed: ERROR: permission denied for relation usuarios I hope you can help me, I don't know if I can solve that error with the phpPgadmin or that is done from the server? Next time, don't keep making posts. Edit your previous post instead. If you need to bump, make sure 24 hours have passed first. As for your isssue, it seems like a user permission situation. Does your user have all permissions?
urano68 Posted December 13, 2019 Author Posted December 13, 2019 (edited) Sorry for the other post, I'm new to this. If the error was of permisology and I could solve it by phpPgadmin, thanks again Edited December 13, 2019 by urano68
Recommended Posts