Questions tagged [php-pgsql]

This is for questions related to getting the PostgreSQL client libraries and PHP extensions working with PHP

89 questions
0
votes
0 answers

Dumping a database with half a million tables takes more than 24h

I have a database which is 160GB in size, and has about 500,000 tables. I ran a pg_dump yesterday using: pg_dump -U mps db_name -f db_name.sql The process seems to be running for more than 24 hours now, and i dont know how much time it will take to…
user3455531
  • 775
  • 1
  • 14
  • 28
0
votes
0 answers

order by queries in postgres extremely slow

I have a lot of order by queries in my project. I have a table with approx 100K records. After performing tests, i found out that: 1) a query with order by selecting 6 elements takes 800-900ms 2) a query without order by selecting 6 elements takes…
user3455531
  • 775
  • 1
  • 14
  • 28
0
votes
1 answer

Conflict Error in PHP PostgreSQL Setup

I am trying to connect to a PostgreSQL Database with PHP.. PHP was already installed. When I tried to execute the following code on the Command Line (Centos) the error below returns yum install php-pgsql Transaction Check Error: file /etc/php.ini…
Calipso
  • 957
  • 3
  • 15
  • 33
0
votes
1 answer

Printing all rows from a Postgres database array

I'm trying to do a simple query from my postgres database, then try to manipulate the data. Script I made goes as following; function connectLocalDB() { $dbconnection = pg_connect("host=192.168.97.120 port=1337 dbname=x user=x password=x") or…
MichaelP
  • 181
  • 5
  • 22
0
votes
1 answer

PHP/PGSQL configured and running on Mavericks (10.9) but pdo_pgsql won't configure

I've just upgraded to MacOS Mavericks (10.9) and I'm using the Postgres.app install. I followed the instructions in the answer to Enabling PostgreSQL support in PHP on Mac OS X to make PGSQL accessible again. I included the…
0
votes
1 answer

Difficulty processing data from jQuery post to pg_query();

Having the following difficulty. I'm currently creating a form. This form is made in HTML and controlled by jQuery. The form code is as following;
MichaelP
  • 181
  • 5
  • 22
0
votes
1 answer

How to refresh pooled PDO connections by PHP?

I am using PDO to connect to a Postgresql DB, using PDO::ATTR_PERSISTENT attribute which does speed up the application noticeably. However I encountered a problem, after debugging it, found that the connections to DB die about 2 hours 11 minutes…
Carmageddon
  • 2,627
  • 4
  • 36
  • 56
0
votes
1 answer

PostgreSQL extension set-up

I'm trying to set-up a connecting with PHP to a PostgreSQL database. I uncommented the following in PHP.ini: extension=php_pdo_pgsql.dll extension=php_pdo_sqlite.dll If I go to XAMPP => Services, I see postgresql-64-9.3 as one of them. I try to…
Anoniem Anoniem
  • 1,915
  • 6
  • 18
  • 19
0
votes
0 answers

How to install postgresql under php5 cgi with nginx on Ubuntu?

I've installed postgreSQL under Ubuntu, with nginx server but I can't make it work with php (php cgi). The error I'm getting is: Your PHP installation does not support PostgreSQL. You need to recompile PHP using the --with-pgsql configure…
Alexandru R
  • 8,560
  • 16
  • 64
  • 98
0
votes
0 answers

PHP with PGSQL on Apache Tomcat 7

I need to execute a php file on apache tomcat server that needs to access postgresql database. The server is Centos Linux. I have apache tomcat 7 , php , postgresql and php-potgresql installed. $ cat /etc/php.d/pgsql.ini [gives the following] ;…
user1628340
  • 901
  • 4
  • 14
  • 27
0
votes
4 answers

Database error in core/Loader.php -- postgresql + codeigniter

i am getting the following error : Unable to connect to your database server using the provided settings. Filename: core/Loader.php Line Number: 346 my database.php is : $db['default']['hostname'] = 'localhost'; $db['default']['username'] =…
Bhumi Singhal
  • 8,063
  • 10
  • 50
  • 76
0
votes
1 answer

Heroku postgres ingress - could not connect to server error

Background.. I'm trying to connect to my heroku database externally from a php script and I'm getting a "Could not connect to server" error The tech.. It's a "crane" production level database, not a shared database. I'm trying to connect from a php…
myagi
  • 71
  • 5
-1
votes
1 answer

Insert into postgres database using PDO

I am trying to insert some data into postgres database using pdo connection in php. Connection is successful, but insert query is giving error in syntax, i cant figure it out what is the fault in my syntax. $dbcon->setAttribute(PDO::ATTR_ERRMODE,…
user3099225
  • 413
  • 1
  • 4
  • 14
-3
votes
1 answer

PHP connect to different Server Database

I am trying to connect to different server database but I keep on getting the error message $conn = pg_pconnect("host=xx.xx.xxx.xxx port=5432 dbname=***** user=***** password=*****") or die ("Could Not Connect. Try again later: " .…
1 2 3 4 5
6