Problems with Apache/PHP after hard drive replacement

Frank Shute 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:
>
> Hello
> 
> 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
                                        ^
and:

$ locate libphp5.so
/usr/local/libexec/apache/libphp5.so

HTH

> --
> 
> find / -name libiconv.so.3 
> picks up one occurrence of the file at
> /usr/local/lib/libiconv.so.3
> 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:
> #!/bin/sh
> ./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 \
> --with-freetype-dir=/usr/local/include/freetype2/freetype
> 
> 'make' runs fine, but 'make clean install' throws a load of warnings during
> the compilation - eg:
> /usr/src/php/php-5.1.5/ext/iconv/iconv.c
> Line 254 [also 528, 641, ... etc etc]
> Warning: passing arg2 of 'libiconv' from incompatible pointer type.
> 
> then:
> Installing PEAR environment:
> /libexec/ld-elf.so.1: shared object "libiconv.so.3" not found, required by
> "libxml2.so.5"
> *** 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

-- 

 Frank 


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 mailing list