Welcome Guest, Not a member yet? Register   Sign In
postgre sql not working
#1
Lightbulb 
(This post was last modified: 08-26-2015, 02:37 AM by Theo.)

Hi all,
I've spend hours trying to use my postgre database. I've searched internet, tried all i've seen, but it stilll don't work

My databse file informations :
Code:
$active_group = 'default';
$query_builder = TRUE;

$db['default'] = array(
'dsn' => 'pgsql:host=localhost;port=5432;dbname=jobdd',
'hostname' => 'localhost',
'username' => 'username', // info for example
'password' => 'password',// info for example
'database' => 'jobdd',
'dbdriver' => 'postgre',
'dbprefix' => '',
'schema'   => 'public',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);

I've changed my original connexion inormations !
It's important to note that databse drvier is loaded

When i try ti connect, i see this message :

A PHP Error was encountered

Severity: Error

Message: Call to undefined function pg_connect()

Filename: postgre/postgre_driver.php

Line Number: 154

Backtrace:


Thank you very much for your help !
Reply
#2

Hello,

I have faced the same issue for almost a week.
At the end, I change the setup in Apache.
Instead of installing php as an apache handler, I run it as Fast CGI.
After that, I see an error message about the setting with "dsn" in the "application/config/database.php".
Then I follow this to change the config file:

https://codezone4.wordpress.com/2013/05/...-database/

After that, the error seems to have gone away. (...will need more testings to confirm it's actually working...)

Hope this helps.
Reply
#3

Hello,

After further testing, I seem to find out the cause of the issue.
In one test, I install php as an apache handler. 
The subject issue occurs.
Then, I copy "libpg.dll" from the "php" folder to "apache/bin".
The problem goes away... Big Grin
Reply




Theme © iAndrew 2016 - Forum software by © MyBB