Questions tagged [php-pgsql]

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

89 questions
2
votes
1 answer

Using pg_connect returning false on php-fpm / CentOS6

I'm now developing a site on CentOS/nginx/postgresql/php(php-fpm). The problem: And I have such a database connection code which blocks: $dbcon = pg_connect( "host=localhost port=5432 dbname=shex_utf8 user=webmaster…
Alfred Huang
  • 17,654
  • 32
  • 118
  • 189
2
votes
2 answers

El Capitan pgsql extension

I just installed OS X El Capitan and it apparently overrode my php and pgsql settings. Can anyone walk me through install/settings to get this back up?
Dean
  • 211
  • 2
  • 16
2
votes
0 answers

installing pgsql extension for php

As the title mentions, I am trying to add the pgsql extension to php, to be able to call functions like: pg_connect() pg_query() etc. in php. I am using Mac OSX 10.10.1 (Yosemite) Those are the steps I followed (precisely- and encountered no…
noia
  • 31
  • 3
2
votes
2 answers

transfer a postgres database to another server without using pg_dump

I am in process of dumping a huge database, and pg_dump is taking a lot of time. I have to transfer my database to a new server. i have searched a lot online, but everyone suggests the same method of dumping the database, then transferring the file…
user3455531
  • 775
  • 1
  • 14
  • 28
2
votes
3 answers

Transaction roll back not working in Postgresql

I am working on PostgreSQL 9.1.4 . I am inserting the data into 2 tables its working nicely. I wish to apply transaction for my tables both table exist in same DB. If my 2nd table going fail on any moment that time my 1 st table should be…
Kanchetianeel
  • 189
  • 2
  • 3
  • 15
1
vote
0 answers

can't install phpPgAdmin with cwp

I am using cwp on my VPS and I have this problem when I try to login to https://hostname:2031/phpPgAdmin/ The PHP configuration on this server does not support PostgreSQL. You need to reinstall PHP using the --with-pgsql configure option. i tried to…
1
vote
2 answers

PHP postgres enable ssl support

Sorry to get back to you for a question that has been asked many years ago. But I am really stuck with this. I have a legacy application which is very old, running PHP 5.2.17. I followed this guide to setup my docker…
Henkie85
  • 197
  • 2
  • 15
1
vote
2 answers

Postreg SQL get All Value with quotes from the comma separated

I have Values which are stored like 1,2,3,4,5 in the database. I want it back like '1','2','3','4','5'. I am trying with string_agg(format('''%s''', ticker_information.user_groups), ',') but giving me result '1,2,3,4,5' Any solution ? Or let me…
Punit Gajjar
  • 4,937
  • 7
  • 35
  • 70
1
vote
2 answers

Does PHP's pg_fetch_assoc() use an Iterator/Cursor?

Does the PHP function pg_fetch_assoc() internally use an Iterator / Cursor, or does it get all data at once, network-wise? Would \PDO be using a Cursor? My context is fetching a large amount of data and I want to know if it gets pulled as a whole or…
Daniel W.
  • 31,164
  • 13
  • 93
  • 151
1
vote
0 answers

Error: cannot find php_pdo_driver.h when installing pdo_pgsql in Mac Mojave

I am trying to add a PHP module in my mamp stack (version 7.2.19). I have been following the guidelines in bitnami; mamp pdo_pgsql module but it gives me an error when I execute the command: ./configure…
KalEmm
  • 97
  • 5
1
vote
2 answers

PHP Select From Postgres Unexpected Character

I have an application written in PHP, I'm connecting to a PGSQL database and selecting some data. This works as expected until I use the string concatenation operator (||) in the query. I connected tothe PGSQL db via PGadmin and generated the query,…
TheOrdinaryGeek
  • 2,273
  • 5
  • 21
  • 47
1
vote
1 answer

Unable to connect to pgsql in Laravel in Docker

I am developing a Web application using Laravel. I am an experienced Laravel developer. But, now I am trying to use Docker as my development environment. But I am so new to Docker. Now I am trying to connect to the Postgres database. I added the…
Wai Yan Hein
  • 13,651
  • 35
  • 180
  • 372
1
vote
1 answer

Error connect to postgres(pg_close)

I have this following code: require 'dataload.php'; function get_objects($where,$name=false) { global $epsg, $cnt_array; $db = Dataload::getDB(); $columns="osm_id, ST_AsGeoJSON(ST_Transform(way,4326)) as way2, name, ward,…
user15445
  • 146
  • 2
  • 20
1
vote
1 answer

PostgreSQL, WAMP, Laravel 5.5 - "php artisan migrate" throwing "driver not found" exception

I'm getting the "Driver not found" PDO exception when trying to connect to PostgreSQL DB and I can't seem to figure out what's happening. Here are system specs: WampServer Version 3.0.3 64bit PHP 7.1.10 Apache 2.4.9 Laravel 5.5 I downloaded…
GTCrais
  • 2,039
  • 2
  • 26
  • 32
1
vote
1 answer

How to install pgsql driver on docker php:7.1-apache?

I have an API Platform project with a postgresql DB and I can't find how to enable pdo pgsql driver with docker.. Here is my docker file : FROM php:7.1-apache # PHP extensions ENV APCU_VERSION 5.1.7 RUN apt-get update \ && apt-get install -y…