Cannot load /usr/local/apache2/modules/ into server: httpd: fatal: relocation error:


I am installing PHP 2.2.9 on SUN Solaris 10 with apache 2.2.9 and perl 5.8.8.
Everything seems to be good unless PHP Configuration.
I did those commands below :
./configure --with-oracle=/u01/app/product/10203
--prefix /usr/local
make install

I did'nt have any fatal error message until the end.
But I get error this messge error when trying to start apache :

httpd: Syntax error on line 55 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/ into server: httpd: fatal: relocation error: file /usr/local/apache2/modules/ symbol xmlTextReaderSetup: referenced symbol not found

I've installed libxml2 yet.
Can you help me to find ?

Thanks for tour reply
Seydina FallIT ingineerAsked:
Who is Participating?
majikmanConnect With a Mentor Commented:
Thats probably because you're not accessing the file via the absolute path. Also, you should make sure that the file's file extension matches whatever you have for the DirectoryIndex directive in your httpd.conf config file.
at line 55 of this file:

you have something like the following entry:
LoadModule php5_module        modules/

the problem is that this file wasn't installed:

Try locating that file using the following command at the terminal: "locate". you may need to run updatedb first. it should be somewhere in /usr/local/apache2. If you find it, move it to /usr/local/apache2/modules/

also, did you install apache before you installed php? If you didn't, then that would explain the error too. You may need to just reinstall php using the same commands as before. actually, it should even work just by typing make install in the php source directory

Seydina FallIT ingineerAuthor Commented:
Thanks for your reply.
But the file is already in the /usr/local/apache2/modules/ directory.
I installed apache before php and wonder where is the problem.
I did the same installation on the same server with the same configuration and everything was ok.
Can you help me ?
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

sorry, i misread the error message. here's the crucial info: symbol xmlTextReaderSetup: referenced symbol not found

looks to me like your php was compiled fine but your LD_LIBRARY_PATH environment variable isn't being properly set. In the script you use to start apache (most likely /usr/local/apache2.bin/apachectl), add a line to specify the LD_LIBRARY_PATH environment variable near the top. it should look something like this..

export LD_LIBRARY_PATH="/usr/local/lib/"

where /usr/local/lib should be the path to your files. If you're not sure where that is, run the command "ldd /usr/local/apache2/modules/" and one of the entries should look something like this: => /usr/local/lib/ (0xb7397000)

the path should be pretty apparent to you.
Seydina FallIT ingineerAuthor Commented:

You're right my libxml configuration was pretty good unless my PATH. Look at the ldd command :
[/c102/users/<users>] ldd /usr/local/apache2/modules/ =>    /usr/lib// =>         /usr/local/lib/ =>        /usr/lib// =>     /usr/lib// =>   /usr/lib// =>        /usr/lib// =>       /usr/local/lib/ =>         /usr/lib// =>   /usr/lib// =>    /usr/lib// =>         /usr/lib// =>     /u01/app/oracle/product/10203//lib32/ =>  /usr/local/lib/ =>         /usr/local/lib/ =>     /usr/lib// =>         /usr/local/lib/ =>   /usr/lib// =>    /usr/lib// =>    /usr/lib// =>   /usr/lib// =>   /u01/app/oracle/product/10203/lib32/ =>     /usr/lib// =>       /usr/lib// =>  /usr/lib// =>         /usr/lib//

I had the libxml in two directories /usr/local/lib/ and /usr/lib/
Apache was looking at the wrong one. So I rename the library under usr/lib and evrything run ok.
Thank you for your help.

But I m having another problem. I cant bring my php pages in the browser when I do http://<server name>. I have apache running ok and only directories displayed. Have you any idea where is my problem ?

Thanks for your feedback
Seydina FallIT ingineerAuthor Commented:
Actually the name of my index page was wrong. I rename it and evrything goes good.
Thank to you for your help
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.