Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

php-5.2.11 / apache2: libphp5.so: undefined symbol _emalloc

55 views
Skip to first unread message

dk

unread,
Oct 30, 2009, 4:44:53 PM10/30/09
to
Hi,

I am trying to upgrade php on a rather old RedHat system. The process
looked pretty simple. I configured php with

configure --prefix=<...>/php-5.2.11 --enable-zip --with-mysqli --
with-mysql --enable-mbstring --with-gd --with-ldap --with-pear --with-
tidy --with-bz2 --with-openssl --with-apxs2=/usr/sbin/apxs --enable-
soap --enable-sockets --enable-pcntl --enable-ftp --enable-calendar

And everything "make"d and installed OK. I moved a copy of libphp5.so
into the path at the apache config expects and tried to restart the
web server. I get the message:

Starting httpd: Syntax error on line 201 of /etc/httpd/conf/
httpd.conf:
Cannot load /usr/lib/httpd/modules/libphp5.so into server: /usr/
lib/httpd/modules/libphp5.so: undefined symbol: _emalloc

What did I do wrong?

dk

unread,
Oct 30, 2009, 4:51:15 PM10/30/09
to
I just ran "strings" on the .so file and only see "_safe_emalloc" and
"_safe_malloc".

Jerry Stuckle

unread,
Oct 30, 2009, 9:42:51 PM10/30/09
to

Which compiler are you using? Are you sure you don't have more than one
copy of the library on your system?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstu...@attglobal.net
==================

johannes keßler

unread,
Nov 2, 2009, 8:15:34 AM11/2/09
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

this error can also accure if you succesfull compiled php but the final file
could not be copied to the right location, leaving the old file untouched.

Make sure you use the right so file and use the right user to compile php which
has access to the /usr/lib/httpd/modules/ folder.

regards,
johannes keßler
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.13 (GNU/Linux)

iEYEARECAAYFAkru23YACgkQE++2Zdc7EtfPigCgjhMC3o68iuOv1e4saIsSNhai
8CIAoJmmRVdVkor0ltEsAjfGaBWFly+9
=GvV6
-----END PGP SIGNATURE-----

dk

unread,
Nov 4, 2009, 12:29:11 PM11/4/09
to

> > What did I do wrong?
>
> Which compiler are you using?  Are you sure you don't have more than one
> copy of the library on your system?

gcc version 3.2.3

dk

unread,
Nov 4, 2009, 12:30:54 PM11/4/09
to
> Hello,
>
> this error can also accure if you succesfull compiled php but the final file
> could not be copied to the right location, leaving the old file untouched.
>
> Make sure you use the right so file and use the right user to compile php which
> has access to the /usr/lib/httpd/modules/ folder.

I downloaded and configured php as me but compiled and tried to
install it as "root"

Greg Russell

unread,
Nov 4, 2009, 1:46:46 PM11/4/09
to
In news:ad03c93f-f3c6-443d...@g27g2000yqn.googlegroups.com,
dk <dean....@gmail.com> typed:

> I am trying to upgrade php on a rather old RedHat system.

...


> And everything "make"d and installed OK. I moved a copy of libphp5.so
> into the path at the apache config expects and tried to restart the
> web server. I get the message:
>
> Starting httpd: Syntax error on line 201 of /etc/httpd/conf/
> httpd.conf:
> Cannot load /usr/lib/httpd/modules/libphp5.so into server: /usr/
> lib/httpd/modules/libphp5.so: undefined symbol: _emalloc
>
> What did I do wrong?

The error message indicates that the system hasn't yet been informed of the
changes, and "ldconfig" as root should fix that if the proper entries exist
in /etc/ld.so.conf and/or the derivative directory /etc/ld.so.conf.d


Jerry Stuckle

unread,
Nov 4, 2009, 7:22:38 PM11/4/09
to

That's version is over six years old. Current is gcc 4.4.2. I'm not
sure if PHP will work with a compiler that old or not. I doubt it.

I would highly recommend you upgrade gcc to a much more current version.

0 new messages