PostgreSQL Error in Windows PHP

I use WAMP for Windows, which installs PHP, Apache and MySQL.

Now I'm working on something new that requires PostgreSQL. The current installation will not do this for me, as I continue to receive these errors:

Function call undefined pg_query ()

Is always

undefined function

I installed PostgreSQL 8.3.7-1 for windows, added php_pgsql.dll, php_pdo_pgsql.dlland even libpq.dllthat the note on the PHP page for postgreSQL says that Windows users need to start with PHP 5.2.6

However, I keep getting these errors ...

Can anyone advise a better course? Or should I just remove apache and everything else and make a fresh install of each component separately?

+3
4

xampp "apache/php", php.ini. php .ini . , , apache, xampp/apache/bin/php.ini. = php_pgsql.dll? ,

echo 'php.ini: ', get_cfg_var('cfg_file_path');
, .
xampp php , apache, php php.ini.
echo extension_loaded('pgsql') ? 'yes':'no';
. apache, , xampp
apache_start.bat
. apache , ( Windows). DLL , .
+3

php ini?

phpinfo() ?

+1

Depending on what errors you see in Apache error.log, the answers to this question may be useful.

+1
source

I did the same as you, and got rid of the problem. But mine was for xampp. You should probably reinstall your game.

0
source

Source: https://habr.com/ru/post/1707987/


All Articles