I'm developing my first program with php. I searched a lot of forums and about 3 or 4 hours, but got nothing.
Here is my index.php code:
<html>
<head>
<title>first program</title>
</head>
<body>
<h1> program loaded successfully</h1>
<?php
echo extension_loaded('pgsql') ? 'yes':'no';
echo pg_connect("host=localhost port=5432 dbname=test user=postgres password=root");
?>
</body>
When I load this page I see this:
program loaded successfully
no
Fatal error: Call to undefined function pg_connect() in D:\courses\web programing\hw2\cinema\index.php on line 9
I installed php-5.4.14-Win32-VC9-x86 on my windows and run my project with this comment:
php.exe" -S localhost:80 -t "D:\courses\web programing\hw2\cinema"
I have php.ini-development and php.ini-production in php folder and Uncommented extension=php_pgsql.dll, extension=php_pdo_pgsql.dll in both files. I'm using postgresql 9.2
So where is my mistake?