Apache Startup Fails with PHP Error

Great tins massive!

Im Manqoba from Midrand, South Africa...

I have installed Apache and PHP on a solaris 9 box, using the packages below:

apache-2.2.14-sol9-sparc-local
php-5.2.13-sol9-sparc-local

After installing the packages I edited my httpd.conf file, to load the php5 module when starting up Apache, by including this line:

LoadModule php5_module modules/libphp5.so

When running apachectl start, I am presented with the following error:
root@test-lm-1 # apachectl start
httpd: Syntax error on line 114 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: ld.so.1: httpd: fatal: relocation error: file /usr/local/apache2/modules/libphp5.so: symbol xmlTextReaderGetAttribute: referenced symbol not found

I have checked to see all the dependency packages are iinstalled, as well as the compatibility of the versions. I uninstalled and reinstalled the libxml package, but still no luck.

It is the fist time I use apache with php, and some assistance will be highly appreciated.

Maybe you can first try manually loading the module and see if that will work?

If you downloaded these packages from sunfreeware.com then please return to that site and read the list of dependencies. There is a list of 19 other packages that are required by this php package. Install them and try again.

I have installed all the dependency packages, before I installed the php. On sunfreeware website the dependency packages are listes as:

Dependencies: 
libiconv,
libidn,
openssl-1.0.0,
curl,
expat,
fontconfig,
freetype,
freetds,
libssh2,
gd,
libintl,
jpeg,
openldap,
mysql,
libpng,
sasl,
libxml2,
zlib,
xpm,
gcc

Even after trying to load the module manually, it still fails with the same error. Is there perhaps a specific order that the packages need to be installed in?? Each time I comment out the line to load the php module, Apache starts up ok.

Is there any packages that I might be missing, since the ones i installed are according to the sunfreeware website

There is no specific order to install the packages. Maybe the runtime path is not correctly compiled into the shared object.

Does

crle -u -l /usr/local/lib

help? This command append /usr/local/lib to the path, that the dynamic linker checks to find objects (assuming libxml.so is in /usr/local/lib).

I gave it a try, and it did not seem to sort anything out. I also listed the dynamic dependencies for the libphp5.so library... and it seemed to find all the dependencies...

Is there a way to use list only the missing dynamic dependencies?? Also, is anybody aware of any dependencies for the libxml2 package, because there is none listed on the sunfreeware site.

bless...

Hmm, if all dependencies are fullfilled, the only other thing I can think of is a wrong version of libxml2.so

Does

/usr/ccs/bin/nm /usr/local/lib/libxml2.so | grep xmlTextReaderGetAttribute

print something like

[2885]  |    799440|     388|FUNC |GLOB |0    |12     |xmlTextReaderGetAttribute

??

---------- Post updated at 13:42 ---------- Previous update was at 13:40 ----------

Ahh, and: did you restart Apache after executing crle ?? I think, the dynamic loader only reads ld.config once at program start.

I have not restarted apache, because I am failing to start it up in the first place... however thanks for the post above... when I grep for xmlTextReaderGetAttribute, it does not seem to find it.

So i ran this command "/usr/ccs/bin/nm /usr/local/lib/libxml2.so | grep xmlTextReaderGetAttribute", without the grep...

root@test-lm-1 # /usr/ccs/bin/nm /usr/local/lib/libxml2.so 

and this is an extract of that output...

[3926]  |    193156|    1016|FUNC |GLOB |0    |11     |xmlSwitchToEncoding
[1112]  |    344500|     140|FUNC |LOCL |0    |11     |xmlSysIDExists
[4294]  |    317448|      64|FUNC |GLOB |0    |11     |xmlTextConcat
[4152]  |    311156|     140|FUNC |GLOB |0    |11     |xmlTextMerge
[3603]  |    904472|       4|OBJT |GLOB |0    |17     |xmlTreeIndentString
[4295]  |    357936|    1328|FUNC |GLOB |0    |11     |xmlURIEscape
[3598]  |    357312|     624|FUNC |GLOB |0    |11     |xmlURIEscapeStr
[3962]  |    356824|     488|FUNC |GLOB |0    |11     |xmlURIUnescapeString
[117]   |    878724|       4|OBJT |LOCL |0    |17     |xmlUTF16BEHandler

from what i see the methods are listed in alphabetical order, and libxml2.so doesn't seem to have the "xmlTextReaderGetAttribute", which would make sense when it says in the error "symbol xmlTextReaderGetAttribute: referenced symbol not found"

I agree with you suggestion that it might be the incorrect version of libxml. However on the sunfreeware site, the only other version they have is libxml-1.8.17. I will remove the one installed, and try this one and let you know.

Thanks man, youve been a real help so far.

I don't think that libxml-1.8.17 will do, because libxml2 is required for php 5.2.13

I have here libxml2-2.6.31 and can locate the symbol in the output of nm. Do your symlinks look like this?

lrwxrwxrwx   1 root     root          17 Dez 22 03:15 libxml2.so -> libxml2.so.2.6.31
lrwxrwxrwx   1 root     root          17 Dez 22 03:15 libxml2.so.2 -> libxml2.so.2.6.31
-rwxr-xr-x   1 bin      bin      1222204 Mrz 10  2008 libxml2.so.2.6.31

@hagrp...

I checked my symlinks like suggested, and i found that there was a missing link to the newer version of the libxml library...

I then created the link using the ln -s command, and tried to start up apache... everything came up fine and i was able to see the website which runs on drupal 6.

I would like to thank you for your assistance and the new commands you taught me. Its highly appreciated.

Bless.

You are welcome, Macarena S.A !