Undefined function pg_escape_bytea() despite good PG version

Undefined function pg_escape_bytea() despite good PG version

am 07.03.2007 10:36:06 von Thomas Woerly

Hello PGsql list people !

My first message on this list.

I am installing a collaborative platform using Apache2.0.59 / PHP4.4.2 an=
d
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, s=
ince
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=3D/usr/local/apache2/bin/apxs --with-dbase
--with-filepro --enable-exif --with-xml --enable-ftp --with-db --enable-b=
cmath
--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-ima=
p-ssl
--with-openssl --enable-sysvsem --enable-sysvshm --with-gettext --with-do=
m
--with-mcrypt --with-iconv --enable-mbstring=3Dall --enable-mbregex --wit=
h-gd
--with-png-dir=3D/usr --with-jpeg-dir=3D/usr
--with-mime-magic=3D/usr/share/magic.mime
--with-pgsql=3D/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


=09

=09
=09
____________________________________________________________ _____________=
__=20
D=E9couvrez une nouvelle fa=E7on d'obtenir des r=E9ponses =E0 toutes vos =
questions !=20
Profitez des connaissances, des opinions et des exp=E9riences des interna=
utes sur Yahoo! Questions/R=E9ponses=20
http://fr.answers.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Re: Undefined function pg_escape_bytea() despite good PG

am 07.03.2007 11:28:17 von Mario Guenterberg

--3MwIy2ne0vdjdPXF
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Mar 07, 2007 at 10:36:06AM +0100, Thomas Woerly wrote:
> Hello PGsql list people !
> --with-pgsql=3D/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
--=20
-----------------------------------------------------
| 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 |
-----------------------------------------------------

--3MwIy2ne0vdjdPXF
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iQIVAwUBRe6TwTUZahlMISn3AQKxqxAArrJeEur81HdciCqnwr5NuAHtzVs2 V+s6
LbjrzIHsAXZBTEkvFo9sNU65xjvetGv8NZwfBSkwdfip2kaCDOLyXgS9jZ8u 5A5T
Izzcd7+n0oB00YzRU46xryu8pHbx2MhmXKqXD8riB4b+xy+0k5j0zcImTbzq O4ce
/vDcTO024qwJNIJtgBUpEJLKQiuKHHLCX6IVp3jU/TGfT74J/ti3MUF9PD0Z OgoZ
DEE7uTwg7T+Pteqgsdwk48OmmL2j7UTKwf+VRLdP6TSsYExjkyMJuTC2B19b PO0y
+omcFhcZUbzltWXKGUPg4tTMultQFJrn8tv6QrTZ3v/TXAd3bw7bBGybL2Wp ECwX
pHFA8iD+57rXIf7KlFGCQagy+/67X2YYRDSNItpS+BfGyk+ADo3zvKYei5y+ 9p7b
iJZFYJtAkHzuM6eM2thNpkAi9f8kcT3aC6ktsWHNZbF7xSczC5912p1phW6i hrsm
D91nEr9A7lGkbF2UUVyryHwe0qem01vHpubIUpN0ijhdnkUbzmd7Fr+CDMuQ Guah
bI7X+sFFF0Uk/DfZ6A3Tv29c4GXnQw13hGjyErHEjLECMlECQyp8n1ktsExr CJO4
+fTVKZASh5VoUY1vuNR12H6UdBdXGGiNGrSlDJenVefsEy1wjhe1hbTryGkI 8pz6
Kng4FmdNABc=
=gZeG
-----END PGP SIGNATURE-----

--3MwIy2ne0vdjdPXF--

Re: Undefined function pg_escape_bytea() despite good PG

am 07.03.2007 11:47:44 von Mario Guenterberg

--+QahgC5+KEYLbs62
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=3D/usr/locla/pgsql/bin/pg_config
> Hello,
>=20
> I hope this is only a bad typo!
> Your PATH to Postgresql must set to /sur/local/pgsql.

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

Greetings
Mario

--=20
-----------------------------------------------------
| 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 |
-----------------------------------------------------

--+QahgC5+KEYLbs62
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iQIVAwUBRe6YUDUZahlMISn3AQIpWBAAj2g/6S44xWHY5XgIHNjkQlPEUIbL hxEP
ynJiTsRTchJGHV1sWC2La3lKtZyb7fTrq3be5Hrmo+VeUZ6nCHZGFq7xNZvi rQfN
kscxbVWL3deayCSoDvmLjZu7cRTv5FvSXJTfhVw8YSJRYHUDWbbRmCBGwKGT 6QW8
/j2xN+0wE+TyhTg3h53Q4Dlkj82nYQMGKgbPK/h6b8VrVynr+2lnKXmoyjIp A5gU
enRDpjGqHjSJ+Hn1RIp9wx7wcGXpPeI9IWbJbSdvhqr/a8a1/ob9cwWExwZe RHjP
Fg5zK5Yg2/kF+7p0fvFSrrtXXmGjSxs/zyUbZlwsDOBExLi7B/nK/PAzvQ7J fkfO
0M7rp7T41/AQ+ZrmP3EmTicceHCna0sQtMrtyWGZ7NX46usIBtk95cVkxXDX pZak
qmMzPAIKVGKAeLw0K7kJ4v101uyyT51TVaP1noY51gTfRIerbeJNJ2FDOL4q ycq/
SnFr2iDvETHvg+aP4MX/nixOB5E5G9DdL3JXyGF7i0veKXtHzAXmS30uk4Bs Qm7L
HPw/PoqZrYOkYOUU1Durkf1RxAKQwsqoSQDYEuhdh5x2oz1Nhz6B+jhYiNtA jk+u
Hev0vGSwFZ4ehMoCGgl0xXnlRDxFhVtfrO5fYzZzECQZJueNRxFMxKUcIdtv kHLI
2KAye3+PxCI=
=Jeox
-----END PGP SIGNATURE-----

--+QahgC5+KEYLbs62--

Re: Undefined function pg_escape_bytea() despite good PG version

am 07.03.2007 12:22:22 von mikie

2007/3/7, Thomas Woerly :
> 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...

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Re: Undefined function pg_escape_bytea() despite good PG version

am 07.03.2007 12:25:06 von mikie

> 2007/3/7, Thomas Woerly :

> > --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.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

RE : Re: Undefined function pg_escape_bytea() despite good PG version

am 07.03.2007 12:52:58 von Thomas Woerly

No sorry, it is a mistyping in my e-mail.
It is "local"
--- mikie a =E9crit :

> > 2007/3/7, Thomas Woerly :
>=20
> > > --with-pgsql=3D/usr/locla/pgsql/bin/pg_config
> >
> > Looks fine to me...
>=20
> 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.
>=20
> Regards,
> M.
>=20
> ---------------------------(end of broadcast)--------------------------=
-
> TIP 4: Have you searched our list archives?
>=20
> http://archives.postgresql.org
>=20



=09

=09
=09
____________________________________________________________ _____________=
__=20
D=E9couvrez une nouvelle fa=E7on d'obtenir des r=E9ponses =E0 toutes vos =
questions !=20
Profitez des connaissances, des opinions et des exp=E9riences des interna=
utes sur Yahoo! Questions/R=E9ponses=20
http://fr.answers.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

RE : Re: Undefined function pg_escape_bytea() despite good PG version

am 07.03.2007 12:54:17 von Thomas Woerly

Hum
No it is really /usr/local/pgsql/bin/pg_config

--- Mario Guenterberg a =E9crit :

> 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=3D/usr/locla/pgsql/bin/pg_config
> > Hello,
> >=20
> > I hope this is only a bad typo!
> > Your PATH to Postgresql must set to /sur/local/pgsql.
>=20
> Ehm... /usr/local/postgresql :-)
>=20
> Greetings
> Mario
>=20
> --=20
> -----------------------------------------------------
> | 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 |
> -----------------------------------------------------
>=20



=09

=09
=09
____________________________________________________________ _____________=
__=20
D=E9couvrez une nouvelle fa=E7on d'obtenir des r=E9ponses =E0 toutes vos =
questions !=20
Profitez des connaissances, des opinions et des exp=E9riences des interna=
utes sur Yahoo! Questions/R=E9ponses=20
http://fr.answers.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Re: RE : Re: Undefined function pg_escape_bytea() despite good PG version

am 07.03.2007 13:56:22 von mikie

2007/3/7, Thomas Woerly :
> No sorry, it is a mistyping in my e-mail.
> It is "local"

OK, have you checked if any other Postgres funtions are working in
your PHP ? For example, can you perform some simple pg_query and see
if you can retrieve any results?

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

RE : Re: RE : Re: Undefined function pg_escape_bytea() despite good PG version

am 07.03.2007 14:12:18 von Thomas Woerly

Yes other functions are working since I can install other web apllication=
s. It
is with a specific application calling this function, that I have a probl=
em.

With a phpinfo() page, i have the pgsql section, but there is no informat=
ion
about the Postgres version.

Thanks for your help all :o)


--- mikie a =E9crit :

> 2007/3/7, Thomas Woerly :
> > No sorry, it is a mistyping in my e-mail.
> > It is "local"
>=20
> OK, have you checked if any other Postgres funtions are working in
> your PHP ? For example, can you perform some simple pg_query and see
> if you can retrieve any results?
>=20
> ---------------------------(end of broadcast)--------------------------=
-
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>=20



=09

=09
=09
____________________________________________________________ _____________=
__=20
D=E9couvrez une nouvelle fa=E7on d'obtenir des r=E9ponses =E0 toutes vos =
questions !=20
Profitez des connaissances, des opinions et des exp=E9riences des interna=
utes sur Yahoo! Questions/R=E9ponses=20
http://fr.answers.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match