这里:
“  "C:/PHP/php5apache2_2_filter.dll"    ”
我试过,加上双引号就出错,不用双引号就没问题。

解决方案 »

  1.   

    还是不行啊...
    Apache的err.log
    PHP Warning:  PHP Startup: Unable to load dynamic library 'c:\\PHP\\ext\\php_pdo_pgsql.dll' - \x8ew\x92\xe8\x82\xb3\x82\xea\x82\xbd\x83\x82\x83W\x83\x85\x81[\x83\x8b\x82\xaa\x8c\xa9\x82\xc2\x82\xa9\x82\xe8\x82\xdc\x82\xb9\x82\xf1\x81B\r\n in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'c:\\PHP\\ext\\php_pgsql.dll' - \x8ew\x92\xe8\x82\xb3\x82\xea\x82\xbd\x83\x82\x83W\x83\x85\x81[\x83\x8b\x82\xaa\x8c\xa9\x82\xc2\x82\xa9\x82\xe8\x82\xdc\x82\xb9\x82\xf1\x81B\r\n in Unknown on line 0
    [Mon May 26 14:21:25 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6 configured -- resuming normal operations
    [Mon May 26 14:21:25 2008] [notice] Server built: Jan 18 2008 00:37:19
    [Mon May 26 14:21:25 2008] [notice] Parent: Created child process 3652
    PHP Warning:  PHP Startup: Unable to load dynamic library 'c:\\PHP\\ext\\php_pdo_pgsql.dll' - \x8ew\x92\xe8\x82\xb3\x82\xea\x82\xbd\x83\x82\x83W\x83\x85\x81[\x83\x8b\x82\xaa\x8c\xa9\x82\xc2\x82\xa9\x82\xe8\x82\xdc\x82\xb9\x82\xf1\x81B\r\n in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'c:\\PHP\\ext\\php_pgsql.dll' - \x8ew\x92\xe8\x82\xb3\x82\xea\x82\xbd\x83\x82\x83W\x83\x85\x81[\x83\x8b\x82\xaa\x8c\xa9\x82\xc2\x82\xa9\x82\xe8\x82\xdc\x82\xb9\x82\xf1\x81B\r\n in Unknown on line 0
    [Mon May 26 14:21:25 2008] [notice] Child 3652: Child process is running
    [Mon May 26 14:21:25 2008] [notice] Child 3652: Acquired the start mutex.
    [Mon May 26 14:21:25 2008] [notice] Child 3652: Starting 64 worker threads.
    [Mon May 26 14:21:25 2008] [notice] Child 3652: Starting thread to listen on port 80.
      

  2.   

    终于解决了,查遍了中文网站,日文网站,英文网站,都没有合适的解决办法...
    只好用笨办法...思路就不说了,我走了好多弯路的,一直以为是配置文件不对,其实不是
    只说解决办法了
    在我的电脑->环境变量里加上
    C:\Program Files\PostgreSQL\8.3\bin;C:\PHP\;C:\PHP\ext;
    cmd下运行PHP -v 没问题了
    把C:\Program Files\PostgreSQL\8.3\bin里所有dll文件
    ,只要不与apache\bin里dll文件冲突的,全拷进去.
    重起Apache,OK!<?php   
         $db_id = pg_connect("host=localhost port=5432   dbname=mydb   user=postgres   password=postgres");   
         if($db_id)   
         echo("$db_id");   
    ?>
    页面显示Resource id #1 ~~