Error in compiling PHP with PostgreSQL support

Started by Cosmos Tongover 24 years ago5 messagesgeneral
Jump to latest
#1Cosmos Tong
cosmossyt@yahoo.com

Dear all,

I can compile PHP 4.0.6 with Postgres 7.1.3 successfully. However,
when I try to start apache, an error comes out:

Cannot load /usr/local/apache/libexec/libphp4.so into server:
/usr/local/apache/libexec/libphp4.so: undefined symbol:
pg_encoding_to_char

I would like to ask how can I solve it.

Thanks in advance.

Regards
Cosmos

#2mike
mike@tkosys.com
In reply to: Cosmos Tong (#1)
Re: Error in compiling PHP with PostgreSQL support

Hi Cosmos,

How did you compile PHP? Was your PHP come with your Linux/Unix software
like Red Hat or did you install PHP from scratch?
Could you tell me each steps that you did to compile PHP? Did you configure
it with apache and enable-track-vars?
I had the same problem before and I solved it. Tell me also what kind of
Operating System that you use.

Mike

#3Cosmos Tong
cosmossyt@NOSPAMyahoo.com
In reply to: mike (#2)
Re: Error in compiling PHP with PostgreSQL support

Dear Mike,

I am using SuSE 7.2. I compile Postgres, PHP, Apache, mod_ssl,
mod_perl, MySQL, Imapd and Curl from source. The PHP is the last item I
compiled.

The following is the options I used to compile Postgres:

--sysconfdir=/usr/local/etc
--enable-syslog
--enable-odbc
--with-maxbackends=128
--with-openssl=/usr
--with-perl
--enable-locale
--enable-recode
--enable-multibyte
--enable-unicode-conversion
--enable-depend
--without-tcl

And the following is the options I used to compile PHP

--with-apxs=/usr/local/apache/bin/apxs
--with-config-file-path=/usr/local/etc
--with-jpeg-dir=/usr
--with-xpm-dir=/usr/X11R6
--with-gd
--with-openssl=/usr
--with-mysql=/usr/local/mysql
--with-pgsql=/usr/local/pgsql
--with-recode
--with-gdbm
--with-curl
--with-imap
--with-imap-ssl
--with-gettext
--enable-dbase
--enable-memory-limit
--enable-sockets
--enable-inline-optimization
--with-trans-sid
--with-pdflib
--enable-sysvshm
--enable-sysvsem
--with-mcrypt
--with-ldap

Thanks very much for your help.

Regards
Cosmos

mike wrote:

Show quoted text

Hi Cosmos,

How did you compile PHP? Was your PHP come with your Linux/Unix software
like Red Hat or did you install PHP from scratch?
Could you tell me each steps that you did to compile PHP? Did you configure
it with apache and enable-track-vars?
I had the same problem before and I solved it. Tell me also what kind of
Operating System that you use.

Mike

#4Martín Marqués
martin@bugs.unl.edu.ar
In reply to: Cosmos Tong (#1)
Re: Error in compiling PHP with PostgreSQL support

On Lun 17 Sep 2001 12:14, Cosmos Tong wrote:

Dear all,

I can compile PHP 4.0.6 with Postgres 7.1.3 successfully. However,
when I try to start apache, an error comes out:

Cannot load /usr/local/apache/libexec/libphp4.so into server:
/usr/local/apache/libexec/libphp4.so: undefined symbol:
pg_encoding_to_char

I would like to ask how can I solve it.

Be sure you have PGLIB in your LD_LIBRARY_PATH when starting apache (or in
the apache init script).

saludos... :-)

--
Porqu� usar una base de datos relacional cualquiera,
si pod�s usar PostgreSQL?
-----------------------------------------------------------------
Mart�n Marqu�s | mmarques@unl.edu.ar
Programador, Administrador, DBA | Centro de Telematica
Universidad Nacional
del Litoral
-----------------------------------------------------------------

#5Keary Suska
hierophant@pcisys.net
In reply to: Martín Marqués (#4)
Re: Error in compiling PHP with PostgreSQL support

IIRC, pg_encoding_to_char relates to multi-byte support. Chances are, your
libpq.so was not originally compiled with multi-byte support. You may have
to recompile.

It may also mean that you have multiple libpq.so installations, one which
does not have multi-byte support and which is being loaded by libphp4.so.

Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"

Show quoted text

From: Mart�n Marqu�s <martin@bugs.unl.edu.ar>
Date: Wed, 19 Sep 2001 15:46:13 -0300
To: Cosmos Tong <cosmossyt@yahoo.com>, pgsql-general@postgresql.org
Subject: Re: [GENERAL] Error in compiling PHP with PostgreSQL support

On Lun 17 Sep 2001 12:14, Cosmos Tong wrote:

Dear all,

I can compile PHP 4.0.6 with Postgres 7.1.3 successfully. However,
when I try to start apache, an error comes out:

Cannot load /usr/local/apache/libexec/libphp4.so into server:
/usr/local/apache/libexec/libphp4.so: undefined symbol:
pg_encoding_to_char

I would like to ask how can I solve it.

Be sure you have PGLIB in your LD_LIBRARY_PATH when starting apache (or in
the apache init script).

saludos... :-)

--
Porqu� usar una base de datos relacional cualquiera,
si pod�s usar PostgreSQL?
-----------------------------------------------------------------
Mart�n Marqu�s | mmarques@unl.edu.ar
Programador, Administrador, DBA | Centro de Telematica
Universidad Nacional
del Litoral
-----------------------------------------------------------------

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

http://archives.postgresql.org