Wampserver has a problem when loading php_pdo_pgsql and php_pgsql modules. After searching on several forums the solution is to download from http://www.bmedon.net/download.
Just copy the libpq.dll from your php directory to the apache bin directory.