We’ve got a PHP app that uses postgres and up until today it’s been passing unit tests just fine. Now when running phpunit we’re getting:
................................................................. 65 / 77 ( 84%)
....PHP Fatal error: Call to undefined function pg_escape_string() in /home/ubuntu/app/src/Model/Table/appTable.php on line 158
That particular model has not changed, nor has anything in our circle.yml file changed.
We are using Ubuntu 14.04 for the build, and have specified that php5-pgsql needs to be installed in our circle.yml
dependencies:
post:
- sudo apt-get update && sudo apt-get install php5-pgsql
The output from the apt-get install command shows that pgsql has been enabled:
Creating config file /etc/php5/mods-available/pgsql.ini with new version
php5_invoke: Enable module pgsql for cli SAPI
php5_invoke: Enable module pgsql for apache2 SAPI
I rebuilt with SSH and was able to see php5-psql installed when running dpkg -l | grep php
Any ideas what might be causing this? Or tips to work around it?
Thanks!