Urget:libmhash.so.2 error

Urget:libmhash.so.2 error

Posted by: mtewari
Posted on: 2008-10-12 19:10:00

Hi,
I custom installed php5 as per the wiki documentation of dreamhost, which did not give me any errors. However I keep getting 500 Internal Server Error.
Dreamhost support says that the logs report this error
"php.cgi: error
while loading shared libraries: libmhash.so.2: cannot open shared object
file: No such file or directory"
Appreciate if anybody can help me out here.
Thanks,
mtewari

Re: Urget:libmhash.so.2 error

Posted by: sXi
Posted on: 2008-10-12 23:30:00

In reply to:

I custom installed php5 as per the wiki documentation


Which one did you follow?


Re: Urget:libmhash.so.2 error

Posted by: mtewari
Posted on: 2008-10-13 11:31:00

Hi,
I used the scripts found at
http://wiki.dreamhost.com/Installing_PHP5#php5-install-prep.sh
and
http://wiki.dreamhost.com/Installing_PHP5#php5-install.sh
with these suggested modifications at those pages

Dreamhost uses: slx. So you need to type( this was inside the imap-2007b directory)

make slx SSLTYPE=none
and

--without-openssl \
--without-imap-ssl"
in the php5-install.sh script

My server is hypnos, if that is of help.
Appreciate your help.
Thanks,
mtewari


Re: Urget:libmhash.so.2 error

Posted by: sXi
Posted on: 2008-10-13 14:34:00

Edits:

# Versions (replace)
CCLIENT="imap-2004g"
CURL="curl-7.19.0"
FREETYPE="freetype-2.3.7"
LIBICONV="libiconv-1.12"
LIBIDN="libidn-1.9"
LIBMCRYPT="libmcrypt-2.5.8"
LIBXML2="libxml2-2.6.32"
LIBXSLT="libxslt-1.1.24"
MHASH="mhash-0.9.9"
PHP5="php-5.2.6"
ZLIB="zlib-1.2.3"

# PHP Features (edit)
--with-imap=${INSTALLDIR} \
--with-imap-ssl=/usr \
--with-openssl=/usr \

# cURL (replace)
cd ${SRCDIR}/${CURL}
./configure --with-openssl=/usr --with-zlib=${INSTALLDIR} \
--with-libidn=${INSTALLDIR} --enable-ipv6 --enable-cookies \
--enable-crypto-auth --prefix=${INSTALLDIR}
make
make install

<< Remove "# OpenSSL" build section from script >> (remove)

# c-client (replace)
cd ${SRCDIR}/${CCLIENT}
make ldb
cp -f c-client/c-client.a ${INSTDIR}/lib/libc-client.a
cp -f c-client/*.h ${INSTDIR}/include

# PHP 5 (replace)
cd ${SRCDIR}/${PHP5}
./configure ${PHPFEATURES}
make clean
make
make install
mkdir -p ${HOME}/${DOMAIN}/cgi-bin
cp -f /etc/php5/cgi/php.ini ${HOME}/${DOMAIN}/cgi-bin/php.ini
cp -f ${INSTALLDIR}/bin/php-cgi ${HOME}/${DOMAIN}/cgi-bin/php.cgi
strip --strip-all ${HOME}/${DOMAIN}/cgi-bin/php.cgi
chmod 0755 ${HOME}/${DOMAIN}/cgi-bin
chmod 0600 ${HOME}/${DOMAIN}/cgi-bin/php.ini
chmod 0500 ${HOME}/${DOMAIN}/cgi-bin/php.cgi

# .htaccess: (create/edit after install)
AddHandler php-cgi .php
Action php-cgi /cgi-bin/php.cgi




Re: Urget:libmhash.so.2 error

Posted by: mtewari
Posted on: 2008-10-13 15:35:00

Hi sXi,
Thanks for the reply.
After making the changes suggested, I am getting this error when I run php5-install-prep.sh
"curl: (19) RETR response: 550".
Appreciate your help.
Thanks,
Mohit


Re: Urget:libmhash.so.2 error

Posted by: sXi
Posted on: 2008-10-13 21:40:00

In prep.sh (edit)

aa_grab http://files.directadmin.com/services/customapache/${CURL}.tar.gz


Re: Urget:libmhash.so.2 error

Posted by: mtewari
Posted on: 2008-10-13 22:27:00

Made the change, however same error.
The tar.gz is downloaded I can see that under the dist directory.
Here is the tail of the command line output while running -prep.sh script
"curl-7.19.0.tar.gz
######################################################################## 100.0%
freetype-2.3.7.tar.gz
######################################################################## 100.0%
libidn-1.9.tar.gz
######################################################################## 100.0%
openssl-0.9.8h.tar.gz
######################################################################## 100.0%
imap-2004g.tar.Z

curl: (19) RETR response: 550
"
I tried downloading the curl tar file on my local machine and it downloaded currectly. is RETR the ftp command, that seems to work correctly as I can see the curl tar file under dist directory.
Really appreciate all your help.
Thanks

Re: Urget:libmhash.so.2 error

Posted by: sXi
Posted on: 2008-10-14 00:44:00

I tried the link they have in the script in a browser and got a "proxy required" error.

I'd suggest changing the imap get to another location, such as:


In prep.sh (edit)

aa_grab http://php526.dreamhosters.com/files/${CCLIENT}.tar.Z


Re: Urget:libmhash.so.2 error

Posted by: mtewari
Posted on: 2008-10-14 16:00:00

Hi sXi,
Got the imap after modifying the following line in -prep.sh
aa_grab ftp://ftp.cac.washington.edu/imap/old/${CCLIENT}.tar.Z (old directory).

however now I am getting this error message in the php5-install.sh
"
-- Building: cURL

Configuring...
Making...
Installing...
Done!
make: *** No rule to make target `ldb'. Stop.
"


Re: Urget:libmhash.so.2 error

Posted by: sXi
Posted on: 2008-10-14 22:57:00

Could you gzip and host (or email me) the scripts you've made?

I'll PM you my email address.


Tags: internal server error500 internal server errorerror while loading shared librariesshared objectdreamhostlogs