----- Original Message ----- 
From: "Zimmerli, David" <[EMAIL PROTECTED]>
To: <php-db@lists.php.net>
Sent: Tuesday, June 03, 2008 10:56 PM
Subject: [PHP-DB] Can't get PHP PGSQL module to load


: 
: 
: Hello all,
: 
:  
: 
: I am trying to use PostGreSQL with PHP (using Apache on Windows), but can't
: get the php_pgsql.dll module to load.  
: 
:  
: 
: phpinfo() reports that the loaded configuration file is C:\Program
: Files\PHP\php.ini.  (It also reports that the "Configuration File (php.ini)
: Path"  is "C:\WINDOWS" - I tried copying php.ini to that directory, but
: still no luck).  In php.ini, I have the lines
: 
:  
: 
: ------------------------------ Begin php.ini excerpt
: --------------------------------------
: 
:  
: 
: extension_dir = ".\extensions"
: 
: ; I've also tried ".\ext" here, and am not actually sure what the "." is
: relative to
: 
:  
: 
: extension=php_pgsql.dll
: 
: ; I've copied php_pgsql.dll to C:\Program Files\PHP\ext and C:\Apache
: Software Foundation\Apache2.2\htdocs\mediawiki\extensions
: 
:  
: 
: ------------------------------ End php.ini excerpt
: --------------------------------------
: 
:  
: 
: I have tried various things in php.ini, and stopped and restarted Apache
: each time.  But each time phpinfo() and get_loaded_extensions() report that
: the module is not loaded.
: 
:  
: 
: I have also tried loading via dl():
: 
:  
: 
: if (!dl("php_pgsql.dll")) print "load failed";
: 
: else print "load succeeded";
: 
:  
: 
: but this reports that the load failed as well.  (I have enable_dl = On in
: php.ini.)
: 
:  
: 
: My set up is as follows:
: 
:  
: 
: WinXP Professional
: 
: Apache 2.2.4
: 
: PHP 5.2.6
: 
: PostGreSQL 8.3
: 
:  
: 
: I am installing everything from pre-built binaries.
: 
:  
: 
: Any help would be much appreciated.
: 
:  
: 
: Regards,
: 
: David Z.
: 
:  
: 
: 

PHP on windows does't support dl function except CGI and CLI.

Did you have an PHPIniDir in httpd.conf ?

It should point to a dir that specific the php.ini location as

PHPIniDir "e:/winnt"

and the extension_dir should be best specific with full path such as 

extension_dir = "e:\webroot\php5\ext\"

Also, please be sure you have followed all the steps from php manual's
installation chapter.

That have a new method for refering the php library.

Eric,

----------------------------------------------------
http://myprojects.srhost.info
eric{at}myprojects{dot}srhost{dot}info

Reply via email to