title: Fatal error: Call to undefined function pg_connect
body: <p>I am using Windows 7, php 5.3.5 and WAMP server.  I have two php files: trigger.php and background.php.<br>
  I want to run background.php as a background process. I have to call this file from trigger.php. To accomplish this I used below method.
  I included following code in trigger.php to make background.php to process in background.</p>
  
  <pre><code>$handle = popen('start /b C:\wamp\bin\php\php5.3.5\php.exe     C:\wamp\www\email3.php','r');
  </code></pre>
  
  <p>in background.php I have the follwing code to connect to database.</p>
  
  <pre><code>$conn_string = "host=localhost port=5432 dbname=tagbase user=postgres password=postgres";  
  </code></pre>
  
  <p>now, on parsing this line am getting the follwing error :  </p>
  
  <blockquote>
    <p>Fatal error: Call to undefined function pg_connect() in C:\wamp\www\background.php on line 3 Call Stack: 0.0002 322792 1. {main}() C:\wamp\www\background.php:0</p>
  </blockquote>
  
  <p>By searching in in the internet I found some solutions, and made changes as recommended below in php.ini,</p>
  
  <pre><code>uncommented, extension=php_pdo_pgsql.dll,
  uncommented, extension=php_pgsql.dll,
  uncommented, extension_dir = "c:/wamp/bin/php/php5.3.5/ext/",
  </code></pre>
  
  <p>also I do have php_pdo_pgsql.dll and php_pgsql.dll files in <code>c:/wamp/bin/php/php5.3.5/ext/</code> folder. </p>
  
  <p>Any suggestions are appreciated.</p>