pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Undefined function pg_escape_bytea() despite good PG version
5+ messages / 3 participants
[nested] [flat]

* Undefined function pg_escape_bytea() despite good PG version
@ 2007-03-07 09:36  Thomas Woerly <yorgat@yahoo.com>
  0 siblings, 2 replies; 5+ messages in thread

From: Thomas Woerly @ 2007-03-07 09:36 UTC (permalink / raw)
  To: pgsql-php

Hello PGsql list people !

My first message on this list.

I am installing a collaborative platform using Apache2.0.59 / PHP4.4.2 and
Postgre 7.4.14

Everthinh works fine in the creation of tables until this for one table :

Call to undefined function: pg_escape_bytea()
in/home/demo/phpgwapi/inc/adodb/drivers/adodb-postgres64.inc.php on line 407

When searching the Web, some say it is due a bad version of PostgreSQL, since
pg_escape_bytea() arrived at v.7.2.

My Webmin and pg_config --version say I have a 7.4.14 version.

I compiled PHP with this
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-dbase
--with-filepro --enable-exif --with-xml --enable-ftp --with-db --enable-bcmath
--enable-calendar --with-jpeg-dir --with-png-dir --with-gd
--enable-gd-native-ttf --with-freetype-dir --with-gettext --with-mysql
--with-zlib-dir --enable-trans-sid --with-imap --with-kerberos --with-imap-ssl
--with-openssl --enable-sysvsem --enable-sysvshm --with-gettext --with-dom
--with-mcrypt --with-iconv --enable-mbstring=all --enable-mbregex --with-gd
--with-png-dir=/usr --with-jpeg-dir=/usr
--with-mime-magic=/usr/share/magic.mime
--with-pgsql=/usr/locla/pgsql/bin/pg_config

More info :
I have the libphp4.so in modules of apache server and the correct
LoadModule php4_module modules/libphp4.so

My phpinfo() shows a pgsql section but does not show the version

Does anyone know how to tackle this ?

Thanks for reading my request.

Greetings
Thomas


	

	
		
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Undefined function pg_escape_bytea() despite good PG version
@ 2007-03-07 10:28  Mario Guenterberg <mg@havelsoft.com>
  parent: Thomas Woerly <yorgat@yahoo.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Mario Guenterberg @ 2007-03-07 10:28 UTC (permalink / raw)
  To: pgsql-php

On Wed, Mar 07, 2007 at 10:36:06AM +0100, Thomas Woerly wrote:
> Hello PGsql list people !
> --with-pgsql=/usr/locla/pgsql/bin/pg_config
Hello,

I hope this is only a bad typo!
Your PATH to Postgresql must set to /sur/local/pgsql.

Greetings
Mario
-- 
 -----------------------------------------------------
| havelsoft.com - Ihr Service Partner für Open Source |
| Tel:  033876-21 966                                 |
| Notruf: 0173-277 33 60                              |
| http://www.havelsoft.com                            |
|                                                     |
| Inhaber: Mario Günterberg                           |
| Mützlitzer Strasse 19                               |
| 14715 Märkisch Luch                                 |
 -----------------------------------------------------

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Undefined function pg_escape_bytea() despite good PG version
@ 2007-03-07 10:47  Mario Guenterberg <mg@havelsoft.com>
  parent: Mario Guenterberg <mg@havelsoft.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Mario Guenterberg @ 2007-03-07 10:47 UTC (permalink / raw)
  To: pgsql-php

On Wed, Mar 07, 2007 at 11:28:17AM +0100, Mario Guenterberg wrote:
> On Wed, Mar 07, 2007 at 10:36:06AM +0100, Thomas Woerly wrote:
> > Hello PGsql list people !
> > --with-pgsql=/usr/locla/pgsql/bin/pg_config
> Hello,
> 
> I hope this is only a bad typo!
> Your PATH to Postgresql must set to /sur/local/pgsql.

Ehm... /usr/local/postgresql :-)

Greetings
Mario

-- 
 -----------------------------------------------------
| havelsoft.com - Ihr Service Partner für Open Source |
| Tel:  033876-21 966                                 |
| Notruf: 0173-277 33 60                              |
| http://www.havelsoft.com                            |
|                                                     |
| Inhaber: Mario Günterberg                           |
| Mützlitzer Strasse 19                               |
| 14715 Märkisch Luch                                 |
 -----------------------------------------------------

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Undefined function pg_escape_bytea() despite good PG version
@ 2007-03-07 11:22  mikie <mikie.pl@gmail.com>
  parent: Thomas Woerly <yorgat@yahoo.com>
  1 sibling, 1 reply; 5+ messages in thread

From: mikie @ 2007-03-07 11:22 UTC (permalink / raw)
  To: pgsql-php

2007/3/7, Thomas Woerly <yorgat@yahoo.com>:
> Hello PGsql list people !
>
> My first message on this list.
>
> I am installing a collaborative platform using Apache2.0.59 / PHP4.4.2 and
> Postgre 7.4.14
>
> Everthinh works fine in the creation of tables until this for one table :
>
> Call to undefined function: pg_escape_bytea()
> in/home/demo/phpgwapi/inc/adodb/drivers/adodb-postgres64.inc.php on line 407

Can we see the line 407 of your php script adodb-postgres64.inc.php ?
This seems to be PHP related problem rather than Postgres...

> When searching the Web, some say it is due a bad version of PostgreSQL, since
> pg_escape_bytea() arrived at v.7.2.

To make things clearer: PHP function pg_escape_bytea() is available in
PHP >= 4.2.0.
This function _requires_ Postgres version minimum 7.2
Please note this is a PHP function, not Postgres.

> My Webmin and pg_config --version say I have a 7.4.14 version.
>
> I compiled PHP with this
> ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-dbase
> --with-filepro --enable-exif --with-xml --enable-ftp --with-db --enable-bcmath
> --enable-calendar --with-jpeg-dir --with-png-dir --with-gd
> --enable-gd-native-ttf --with-freetype-dir --with-gettext --with-mysql
> --with-zlib-dir --enable-trans-sid --with-imap --with-kerberos --with-imap-ssl
> --with-openssl --enable-sysvsem --enable-sysvshm --with-gettext --with-dom
> --with-mcrypt --with-iconv --enable-mbstring=all --enable-mbregex --with-gd
> --with-png-dir=/usr --with-jpeg-dir=/usr
> --with-mime-magic=/usr/share/magic.mime
> --with-pgsql=/usr/locla/pgsql/bin/pg_config

Looks fine to me...



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Undefined function pg_escape_bytea() despite good PG version
@ 2007-03-07 11:25  mikie <mikie.pl@gmail.com>
  parent: mikie <mikie.pl@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: mikie @ 2007-03-07 11:25 UTC (permalink / raw)
  To: pgsql-php

> 2007/3/7, Thomas Woerly <yorgat@yahoo.com>:

> > --with-pgsql=/usr/locla/pgsql/bin/pg_config
>
> Looks fine to me...

Edit: if this path is really "locla" and not "local", then it means
that postgres functions are not compiled in PHP (because of your typo
mistake). That is why one of the functions like php_escape_bytea() is
not available in your PHP compilation, probably all PG functions are
not available at all.

Regards,
M.



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2007-03-07 11:25 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-03-07 09:36 Undefined function pg_escape_bytea() despite good PG version Thomas Woerly <yorgat@yahoo.com>
2007-03-07 10:28 ` Mario Guenterberg <mg@havelsoft.com>
2007-03-07 10:47   ` Mario Guenterberg <mg@havelsoft.com>
2007-03-07 11:22 ` mikie <mikie.pl@gmail.com>
2007-03-07 11:25   ` mikie <mikie.pl@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox