SOLVED: Postgresql functions not working...

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
dragonreborn
Forum Newbie
Posts: 8
Joined: Mon Mar 22, 2004 11:49 am
Location: Utah
Contact:

SOLVED: Postgresql functions not working...

Post by dragonreborn »

I have php installed and thought I had postgresql support but phppgadmin won't work. Throws the following error, "Your PHP installation does not support PostgreSQL. You need to recompile PHP using the --with-pgsql configure option."

Any ideas?
Last edited by dragonreborn on Tue Mar 23, 2004 9:18 pm, edited 1 time in total.
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

You either do need to recompile PHP --with-pgsql or just edit php.ini and add/uncomment extension-pgsql.so and restart apache.
(i'm presuming your on *nix by the way)
dragonreborn
Forum Newbie
Posts: 8
Joined: Mon Mar 22, 2004 11:49 am
Location: Utah
Contact:

Post by dragonreborn »

Actually I'm running it on windows. I have already changed the .ini file and uncommented extension=php_pgsql.dll but still not work. I don't know how to recompile php. If you do please tell me =)

(edited: I'm running apache2 on windows XP hope this helps... but having the same problem on a freebsd server running apache2)
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

You shouldn't need to recompile it on windows. What does the following test script output?

Code: Select all

<?php
if(function_exists('pg_connect')){
    echo 'Got pgsql support';
} else {
    echo 'NO pgsql support';
}
?>
dragonreborn
Forum Newbie
Posts: 8
Joined: Mon Mar 22, 2004 11:49 am
Location: Utah
Contact:

Post by dragonreborn »

Sorry I'm so slow with my replies. The script you wrote there is almost just like the check function in phppgadmin and it will return false...or "No pgsql support". I'm a little confused about it though seeing as how the .ini has changed but still not getting the functions. I have seen a few articles saying there is supposed to be something in the WINDOWS folder but that just doesn't make sense. Anyway, I'll be here for your next reply or if you want to IM me try my im links or AIM user mitchelltp...yahoo: cotton2024
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Well, i'd first check a phpinfo() page and you're editing the right php.ini file, (whatever Configuration File (php.ini) Path is set to) usually c:\windows\php.ini
Then edit php.ini and make sure extension_dir points to the php extension dir, something like c:\php\extensions .. then make sure php_pgsql.dll is in that directory, then double check extension=php_pgsql.dll is uncommented.
Then restart apache.
Then reload the phpinfo() page and just over half way down the page you should see a pgsql section. If you do then it should all work ok.
dragonreborn
Forum Newbie
Posts: 8
Joined: Mon Mar 22, 2004 11:49 am
Location: Utah
Contact:

Post by dragonreborn »

OK!!! was editting the wrong ini file. LOL makes me feel stupid...but hey at least it's fixed now I can get down to business. TY, ty, ty...you were a great help.
Post Reply