tpl41803 Posted September 14, 2009 Share Posted September 14, 2009 I'm just learning my way around PHP! Everything I haven't been able to figure out you guys have helped me with. I've decided that flatfile databases won't work for the projects I've been asked to work on recently so I am trying out Postgresql -- I had a really hard time working with MYSQL, I just didn't understand how it was working about a year ago when I tried it out. Postgresql seems to be pretty straightforward and I have gotten it installed onto my server. HOWEVER, when I run any php scripts, it doesn't seem to be working. I have determined that my installation of PHP doesn't have postgresql enabled or activated. I have searched around (both here, on other forums, and websites) and I can't figure out how to get it working properly. my php.ini, I believe, has it enabled properly: I added this line under DYNAMIC EXTENSIONS (according to a tutorial I found somewhere) extension=php_pgsql.dll and the PostgreSQL section looks like this (haven't made any changes) [PostgresSQL] ; Allow or prevent persistent links. pgsql.allow_persistent = On ; Detect broken persistent links always with pg_pconnect(). ; Auto reset feature requires a little overheads. pgsql.auto_reset_persistent = Off ; Maximum number of persistent links. -1 means no limit. pgsql.max_persistent = -1 ; Maximum number of links (persistent+non persistent). -1 means no limit. pgsql.max_links = -1 ; Ignore PostgreSQL backends Notice message or not. ; Notice message logging require a little overheads. pgsql.ignore_notice = 0 ; Log PostgreSQL backends Notice message or not. ; Unless pgsql.ignore_notice=0, module cannot log notice message. pgsql.log_notice = 0 Everything I have found tells me I need to enter ./configure --with-pgsql Into the PHP configuration script, but I can't for the life of me figure out where to enter this. Please help :-D Quote Link to comment https://forums.phpfreaks.com/topic/174233-configuring-php-for-postgresql/ Share on other sites More sharing options...
btherl Posted September 15, 2009 Share Posted September 15, 2009 That "configure" line is for if you compile php yourself with postgres support. How did you install php? And the webserver? If you installed them as some kind of pre-packaged thing, then that packaging system should have a way to set up postgres to work with it (I'm being very general here because I'm more of a linux person and you appear to be using windows). Quote Link to comment https://forums.phpfreaks.com/topic/174233-configuring-php-for-postgresql/#findComment-918739 Share on other sites More sharing options...
tpl41803 Posted September 15, 2009 Author Share Posted September 15, 2009 Yes I work on windows. At the moment I am just working on my local server (apache). I'm not much of a programing guru so I downloaded the pre-packaged executables for windows (both Apache, PHP, and now postgres). I hadn't thought to try to re-install php, I can give that a shot. But when I installed it I don't remember any settings choices during the installation. Quote Link to comment https://forums.phpfreaks.com/topic/174233-configuring-php-for-postgresql/#findComment-918994 Share on other sites More sharing options...
artacus Posted September 15, 2009 Share Posted September 15, 2009 pre-packaged executables for windows (both Apache, PHP, and now postgres). By pre-packaged, he means the whole stack bundled together not one package for PHP and another for Apache... Like XAMPP or WAMP. http://www.apachefriends.org/en/xampp.html http://www.devside.net/server/webdeveloper http://bitnami.org/article/apache-php-and-postgresql-all-in-one Quote Link to comment https://forums.phpfreaks.com/topic/174233-configuring-php-for-postgresql/#findComment-919139 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.