Jump to content

Fatal error: Call to undefined function pg_escape_string()


swraman

Recommended Posts

I get this error when I run a webapp Im trying to use:

 

Fatal error: Call to undefined function pg_escape_string() in ...

 

I know the application works, as Ive been developing and modifying it for a while now. Im trying to get it running on my Linux desktop so editing will be easier.

 

My server setup:

 

-Apache2 on Linux (Ubuntu)

-PHP 5.3.2

-PostgreSQL 8.4

 

PHP IS CONFIGURED to use postgres, I know thats the most obvious thing that stands out with this problem, but I did configure PHP with:

 

'./configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-pgsql=/opt/PostgreSQL/8.4/'

 

and in phpinfo It has a section for "PostgreSQL Support"; and if I run php -m pgsql is on the list of installed modules.  I can use other PG commands, and can connect to a postgres server and such.  This function doesnt work though.

 

Im completely baffled. If it makes any difference, I had PHP 5.3.1 installed earlier, and I got this error; then I downloaded/compiled/installed 5.3.2 to see if it fixed it, but it didn't.

 

Thanks, any help appreciated.

Tried retyping it...still not working.

 

I got frustrated (and since Im not extremely farmiliar with Linux) just formatted my entire Ubuntu partition.  I reinstalled pgSQL, Apache, and PHP, and it STILL gives me the same error!

 

Is this a more widespread problem?  I havent read anything about it anywhere.

 

If this really can't be fixed, I can write a substitute function for pg_escape_string, but I really want to get this fixed.

 

thanks

 

Raman

  • 4 months later...
  • 1 year later...

Ok it's a old thread, but it's the first result in google for "pg_escape_identifier undefined function"; so i'm replying.

 

http://www.php.net/manual/fr/function.pg-escape-identifier.php

 

It's shows : (No version information available, might only be in SVN)

 

I can't understand why, but it's so. And i also can't use this function. (I use addcslashes($f, '"') instead...)

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.