As the title mentions, I am trying to add the pgsql extension to php, to be able to call functions like: pg_connect() pg_query() etc. in php. I am using Mac OSX 10.10.1 (Yosemite)
Those are the steps I followed (precisely- and encountered no errors)
- Found my version of PHP: php -v.
- Downloaded the version of PHP that matches mine: curl -O http://us.php.net/distributions/php-5.5.14.tar.gz.
- Extracted the archive I downloaded: tar -xzvf php-5.5.14.tar.gz
- Changed to the PostgreSQL's extension directory: cd php5.5.14/ext/pgsql/
- Typed phpize (already have autoconf installed)
- Typed ./configure --with-pgsql=/Library/PostgreSQL/9.4
- Typed make.
- Typed sudo make install.
- Added the extension to my php.ini file by adding extension=pgsql.so.
- Restarted Apache
If I now execute pg functions in php it still comes up with the same error as before: "Fatal error: Call to undefined function pg_connect() in /Applications/XAMPP/xamppfiles/htdocs/connect.php on line 8"
In the terminal php -m, will NOT list pgsql. Maybe someone's got some ideas, what could be going wrong in the install process.