jamest Posted November 13, 2006 Share Posted November 13, 2006 Hey everyone,I'm having trouble connecting to postgreSQL using PHP.I'm using postgreSQL 7.4, php 5 and apache HTTP server 2.2.3 on RHEL 4. So far I've managed to get PHP to work with apache but cannot get PHP working with postgreSQL. When I configured PHP I used the option --with-pgsql=shared, and the php.ini file has extension=pgsql.so enabled and the extension_dir set appropriately. When I set up postgreSQL, I did not use the -i option, but I have changed the postgresql.conf file to enable tcpip_socket connections. Ive also modified the pg_hba.conf file to accept local connections and a number of host connections.When I run postgreSQL by itself I'm able to access the database and run queries, but if I try from a PHP script I have no luck. The php code is being recognised but it fails when I call pg_connect. Any help would be greatThanksJames Quote Link to comment https://forums.phpfreaks.com/topic/27089-connecting-to-database-using-php/ Share on other sites More sharing options...
jamest Posted November 13, 2006 Author Share Posted November 13, 2006 Don't worry about it, just me going blind. left out a number in my host address Quote Link to comment https://forums.phpfreaks.com/topic/27089-connecting-to-database-using-php/#findComment-123916 Share on other sites More sharing options...
weknowtheworld Posted January 6, 2007 Share Posted January 6, 2007 Ok.. :) Quote Link to comment https://forums.phpfreaks.com/topic/27089-connecting-to-database-using-php/#findComment-154337 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.