X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 0D63411F61F0 for ; Thu, 27 Apr 2006 12:37:39 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 49063-03 for ; Thu, 27 Apr 2006 12:37:28 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from imail4.gazeta.pl (imail4.gazeta.pl [193.42.231.135]) by postgresql.org (Postfix) with ESMTP id 8886611F61E8 for ; Thu, 27 Apr 2006 12:37:27 -0300 (ADT) Received: from poczta.gazeta.pl (unverified [172.20.25.75]) by (imail4.gazeta.pl) with ESMTP id 3399435 for ; Thu, 27 Apr 2006 17:47:46 +0200 Received: from ew10 (unverified [172.20.26.240]) by av.gazeta.pl (av.gazeta.pl) with ESMTP id 104781 for ; Thu, 27 Apr 2006 17:37:19 +0200 Message-ID: <25994074.34971146152246147.JavaMail.webadm@ew10> Date: Thu, 27 Apr 2006 17:37:26 +0200 (CEST) From: To: pgsql-php@postgresql.org Subject: Re: PostgreSQL 8.1 + PHP5.1.x/4.4.2 + Apache 2.0.55/1.3.34 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 8bit X-mailer: (c)Agora mailer (v4.00) Organization: Agora S.A. X-IP: 195.150.77.248 X-Complaints-To: abuse@gazeta.pl X-URL: http://www.gazeta.pl X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.666 tagged_above=0 required=5 tests=AWL, BAYES_00, NO_REAL_NAME, SPF_PASS, X_IP X-Spam-Level: X-Archive-Number: 200604/25 X-Sequence-Number: 3495 > Help! I was trying to make an installation of PHP 5.1.2 + Apache > 2.0.55 + PostgreSQL 8.1 on Windows 2003 Server, and I'm stuck. I > got PHP to work with Apache quite smoothly, so did I marry PHP > with PostgreSQL - scripts connecting to the database work fine > from windows command line, except that the following code: > > if (extension_loaded("php_pgsql")) { > echo "PGSQL loaded!"; > } > > returns no message. Still database queries work fine. Trouble > starts > when I try to open a page in my browser - then I get an error > message like this: > > Error: call to udefined function pg_connect()... > > I changed the php.ini file a billion times, trying to figure out > what to set in the "extension_dir" and "extension=php_pgsql.dll" > lines, and I tried at least as many times to change apache's > httpd.conf file so that the php module is loaded properly. And it > is, as far as I'm concerned - the phpinfo() page shows without a > problem. One peculiar thing about it is that in the "Loaded > modules" section (don't remember the exact name) there's > absolutely no sign of the pgsql module. >>you could change the first check to: >>if (!function_exists('pg_connect')) { >> die("no pg_connect"); >>} I did. I got the message "no pg_connect", as You had probably expected... >>What does: >> >>print_r(get_loaded_extensions()); >> >>show? >> >>Anything regarding pgsql? Here's the output from both php4 and php5 on both Apache 1.3.45 and 2.0.55: Array ( [0] => standard [1] => bcmath [2] => calendar [3] => ctype [4] => com [5] => ftp [6] => mysql [7] => odbc [8] => overload [9] => pcre [10] => session [11] => tokenizer [12] => xml [13] => wddx [14] => zlib [15] => apache ) Actually, it used to be like what's written above, but suddenly it changed to this and is still like it, no matter what I do: Array ( [0] => bcmath [1] => calendar [2] => com_dotnet [3] => ctype [4] => date [5] => ftp [6] => hash [7] => iconv [8] => odbc [9] => pcre [10] => Reflection [11] => session [12] => libxml [13] => standard [14] => tokenizer [15] => zlib [16] => SimpleXML [17] => dom [18] => SPL [19] => wddx [20] => xml [21] => xmlreader [22] => xmlwriter [23] => apache2handler ) >>Does your server keep logs? Maybe something in there will give you >>some ideas about what's going on.. Inside error.log I found the following line (a number of times, probably because I was often changing httpd.conf and restarting the server): PHP Warning: PHP Startup: Unable to load dynamic library './ext/php_pgsql.dll' - Unable to locate specified module in Unknown on line 0 (This might not be the exact message as I was translating the part after "-" from my native language, which is Polish. By the way, here's some more detailed info about my installation: PHP4 directory: C:\PHP4 (extensions in C:\PHP4\extensions) PHP5 directory: C:\PHP5 (extensions in C:\PHP5\ext) Apache 1.3.34 directory: C:\Program Files\Apache Group\Apache Apache 2.0.55 directory: C:\Program Files\Apache Group\Apache2 The following comments will relate to PHP5 + Apache2 configuration files. I tried the same things with other combinations of php and apache versions with the same result (i.e. no result). All of these lines are uncommented. php.ini (located in C:\PHP5\php.ini) doc_root= user_dir= extension_dir="C:/PHP5/ext/" (also tried "./ext", "C:\PHP5\ext") ... extension=php_pgsql.dll httpd.conf (located in ...Apache2\conf\httpd.conf) UserDir "D:/WWW/*" DirectoryIndex index.php index.htm index.html index.html.var LoadModule php5_module "C:\PHP5\php5apache2.dll" AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps PHPIniDir "C:\PHP5\" -- Nie przychodz! Nie przyjezdzaj! Nie dzwon! Zamow ogloszenie drobne do "Gazety Wyborczej" przez internet wchodzac na http://www.aaaby.pl/wyborcza i wygraj nawet 10.000 zl!