mhash and PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
-linux_lad
Forum Newbie
Posts: 1
Joined: Tue Jun 04, 2002 11:07 am

mhash and PHP

Post by -linux_lad »

I recompiled PHP with mhash, and was unable to get it to work, despite following the instructions explicitly. I got curious, and started asking around. I was unable to find a single host who had successfully installed mhash and had it working. Is there a trick or what? There's nothing in the documentation to suggest that this is anything but routine...

Also, I'm switching over to freeBSD for my personal server. Any PHP/MySQL bugs I should be aware of?
User avatar
bluenote
Forum Commoner
Posts: 93
Joined: Sat Mar 01, 2003 4:59 am
Location: Heidelberg, Germany

Post by bluenote »

Hi,

i have compiled PHP with mhash on a SunFire V240 / Solaris 9 SPARC, and it's working fine. Here's what i did:

Code: Select all

bash-2.05# cd /usr/local/src
bash-2.05# gunzip < mhash-0.9.1.tar.gz | /usr/local/bin/tar xovf -
bash-2.05# cd mhash-0.9.1

bash-2.05# export PATH=/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/usr/openwin/bin:/usr/ccs/bin:/usr/ucb
bash-2.05# export CPPFLAGS="-I/usr/local/ssl/include/openssl -I/usr/local/ssl/include"
bash-2.05# export LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib -L/usr/local/lib -R/usr/local/lib"
bash-2.05# export CC="/usr/local/bin/gcc"

bash-2.05# ./configure
bash-2.05# make
bash-2.05# make install
Then i re-compiled PHP:

Code: Select all

bash-2.05# export CC="/usr/local/bin/gcc"
bash-2.05# export LDFLAGS="-R/local/openldap/lib -R/etc/lib -L/usr/lib -R/usr/ucblib -R/usr/local/lib -R/usr/local/apache/lib -R/usr/local/ssl/lib -R/usr/local/mysql/lib"
bash-2.05# export CPPFLAGS="-I/local/openldap/include -I/usr/include -I/usr/local/include -I/usr/local/mysql/include -I/usr/local/apache/include"
bash-2.05# export PATH=/local/openldap/bin:/usr/sbin:/usr/bin:/usr/lib/nis:/usr/local/bin:/usr/ccs/bin:/usr/local/apache/bin/apxs:/usr/local/mysql/bin
bash-2.05# export LD_LIBRARY_PATH=/local/openldap/lib:/usr/local/ssl/lib:/usr/local/mysql/lib
bash-2.05# export LD_RUN_PATH=/local/openldap/bin:/usr/sbin:/usr/bin:/usr/lib/nis:/usr/local/bin:/usr/ccs/bin:/usr/local/apache/bin/apxs:/usr/local/mysql/bin

bash-2.05# ln -s /usr/ccs/bin/ar /usr/local/bin/ar
bash-2.05# ln -s /usr/local/bin/libtool ./libtool

bash-2.05# ./configure --with-apxs=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/lib/BLUErdb-2.0/conf --with-config-file-scan-dir=/usr/local/lib/BLUErdb-2.0/conf --with-ldap=/local/openldap --with-mcrypt=/usr/local/lib --with-mhash=/usr/local/lib --with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysql=/usr/local/mysql --with-openssl=/usr/local/ssl --with-zlib-dir=/usr/local/include --with-gd --with-jpeg-dir=/usr/local/lib --enable-gd-native-ttf --enable-gd-jis-conv --with-curl=/usr/local/include/curl --with-curlwrappers --enable-dbx --with-iconv=/usr/local/bin/iconv --enable-calendar --enable-soap

bash-2.05# make clean
bash-2.05# make
bash-2.05# make install
That was all. I hope this helps... What was / is exactly your problem?

Greez,
- bluenote
Post Reply