Fatal error: Call to undefined function pg_connect

后端 未结 3 1607
一向
一向 2020-12-11 05:07

I am using Windows 7, php 5.3.5 and WAMP server. I have two php files: trigger.php and background.php.
I want to run background.php as a background process. I have to c

3条回答
  •  醉酒成梦
    2020-12-11 05:19

    if we install WAMP server, we will get two php.ini files. one in C:\wamp\bin\php\php5.3.5 and another in C:\wamp\bin\apache\Apache2.2.17\bin.

    if we execute a php file from browser, then php.ini file in C:\wamp\bin\apache\Apache2.2.17\bin will be referred. if we execute a php file from command line, then php.ini file in C:\wamp\bin\php\php5.3.5 will be referred.

    what ever the changes i made enable/disable the dll in PHP->PHP extensions,all the changes will be saved in C:\wamp\bin\apache\Apache2.2.17\bin\php.ini file. but C:\wamp\bin\php\php5.3.5\php.ini file remains unchanged.

    for my problem, i made the following changes

    uncommented, extension=php_pdo_pgsql.dll,
    uncommented, extension=php_pgsql.dll,
    uncommented, extension_dir = "c:/wamp/bin/php/php5.3.5/ext/",
    

    in C:\wamp\bin\php\php5.3.5\php.ini file. Now its working good. :)

提交回复
热议问题