Problems with Apache/PHP after hard drive replacement

Charles Brewster charles-brewster at
Tue Oct 3 10:34:39 BST 2006


We have the builders in at home, and I've had to physically move the FreeBSD
server box.

Following the inevitable shutdown and restart, I lost an old hard drive in
the machine which was used for backup, and happened to be 'primary master'
(ad0) on the machine.

The drive has now been replaced, and the system reboots fine, but when it
comes to start Apache, there seems to be a problem if the PHP module is
loaded, which it ordinarily would be. If I edit httpd.conf and comment out
the line:
LoadModule php5_module        libexec/
Apache starts fine without PHP.

With the PHP LoadModule line in, when I try to start Apache I get
Syntax error on line 205 of /usr/local/apache/conf/httpd.conf  [the PHP5
LoadModule line above]
Cannot load  /usr/local/apache/libexec/ into server: Shared object
"" not found, required by ""
/usr/local/apache/bin/apachectl start: httpd could not be started

find / -name 
picks up one occurrence of the file at
that file exists, is non-empty, and looks in the 'ee' editor much as I would
expect for an object code file.

It seems to me either as if the object file has become corrupted, or some
dependency path setting is not present or mangled.

I've tried recompiling PHP using my usual configure_php file:
./configure \
--with-mysql=/usr/local/mysql-standard-4.0.24-unknown-freebsd4.7-i386 \
--with-apxs=/usr/local/apache/bin/apxs \
--with-gd \
--with-png-dir=/usr/local/include/libpng \
--with-jpeg-dir=/usr/local/include \
--with-zlib-dir=/usr/src/php/php-5.0.4/ext/zlib \
--enable-gd-native-ttf \

'make' runs fine, but 'make clean install' throws a load of warnings during
the compilation - eg:
Line 254 [also 528, 641, ... etc etc]
Warning: passing arg2 of 'libiconv' from incompatible pointer type.

Installing PEAR environment:
/libexec/ shared object "" not found, required by
*** Error code 1
[the same message as when I try to start Apache with the PHP5 LoadModule
line in.]

Please can anyone suggest how I might get round this problem. Would
upgrading to PHP-5.1.6 clear out and rebuild everything?

Many thanks for any help.

Charles Brewster

512k Broadband £14.99 per month
Unlimited Downloads - No extra Costs
£14.99 per month (inc. VAT)
Order Now

More information about the Ukfreebsd mailing list