Jump to content

Recommended Posts

Posted (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 by urano68
Posted

 

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

Posted

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    trust
host    all    127.0.0.1/32    trust

Posted (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 by urano68
Posted (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 by urano68
Posted

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?

Posted

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?

Posted (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 by urano68
Guest
This topic is now closed to further replies.
×
×
  • Create New...