faqts : Computers : Programming : Languages : PHP : Installation and Setup : Web Servers : Apache

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

26 of 48 people (54%) answered Yes
Recently 2 of 10 people (20%) answered Yes

Entry

fatal: relocation error: When starting Apache
fatal: relocation error: When starting Apache

Feb 17th, 2002 10:15
Shane Kinsch,


PHP 4.1.1 / Apache 1.32 Build Issues (Solaris 2.8)

Apache build options:
./configure --prefix=/usr/local/etc/apache --enable-module=rewrite
--enable-shared=rewrite

PHP build options:
./configure --with-mysql=/usr/local/etc/mysql
--with-apxs=/usr/local/etc/apache/bin/apxs

Both Apahce and PHP compiled without errors and installed cleanly.

The Error when starting Apache:

Syntax error on line 208 of /usr/local/etc/apache/conf/httpd.conf:
Cannot load /usr/local/etc/apache/libexec/libphp4.so into server:
ld.so.1: /usr/local/etc/apache/bin/httpd: fatal: relocation error: file
/usr/local/etc/apache/libexec/libphp4.so: symbol dn_skipname: referenced
symbol not found ./apachectl start: httpd could not be started

Line 208 in the httpd.conf file is: 
LoadModule php4_module        libexec/libphp4.so

The solution:

For some reason, even though LD_LIBRARY_PATH was being set properly,
it wasn't being read fully.  You will need to create a runtime
linking environment by doing this:

#crle -c /var/ld/ld.config -l
/usr/lib:/usr/local/lib:/usr/local/etc/mysql/lib


Shane Kinsch
NetraCorp LLC / SecurNET Consulting