Problems with Apache/PHP after hard drive replacement
frank at esperance-linux.co.uk
Tue Oct 3 16:41:59 BST 2006
On Tue, Oct 03, 2006 at 10:34:39AM +0100, Charles Brewster wrote:
> 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/libphp5.so
> 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/libphp5.so into server: Shared object
> "libiconv.so.3" not found, required by "libxml2.so.5"
> /usr/local/apache/bin/apachectl start: httpd could not be started
I've had a look at my httpd.conf (apache-1.3.37_1) and I've got:
LoadModule php5_module libexec/apache/libphp5.so
$ locate libphp5.so
> find / -name libiconv.so.3
> 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/ld-elf.so.1: shared object "libiconv.so.3" 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
echo "f r a n k @ e s p e r a n c e - l i n u x . c o . u k" | sed 's/ //g'
--->PGP keyID: 0x10BD6F4B<---
More information about the Ukfreebsd