This topic is locked

Fatal error: Call to undefined function pg_escape_string()

6/9/2017 11:49:31 PM
PHPRunner General questions
K
Khampol author

Hello,
I use 2 servers for this :

  • Server Php (VestaCP) for host php files.
  • Server PostgreSQL (ubuntu) to host my DB.
    In Phprunner all connect fine to DB and can generate php no problem, after upload by FTP I have this error :

Fatal error: Call to undefined function pg_escape_string() in /home/admin/web/xxxxxxx.info/public_html/xxxx/connections/PostgreConnection.php on line 30


I look in php.ini and do not find function pg_escape_string. How I do to install it?

dermemo 6/10/2017

You need to install the Postgres PHP package
log into the shell, assuming you are using PHP 5.something

sudo apt-get install php5-pgsql


restart Apache after

sudo service apache2 restart