php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17700 Call to undefined function: mhash()
Submitted: 2002-06-11 10:46 UTC Modified: 2002-06-13 09:53 UTC
From: sanjeevp at motechsoftware dot com Assigned:
Status: Not a bug Package: mhash related
PHP Version: 4.0.6 OS: RedHat Linux 7.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
22 + 42 = ?
Subscribe to this entry?

 
 [2002-06-11 10:46 UTC] sanjeevp at motechsoftware dot com
Hi,

I wanted  to run php through command prompt.
So, I installed libedit from sourceforge.net & installed it.
Then, i again configured php with libedit.
To use mhash function for encrytion.
I reconfigured php with mhash.
The used the following configure script for php
./configure  --with-apxs=/usr/local/apache/bin/apxs --with-pgsql=/usr/local/pgsql --enable-mbstring --enable-mbstr-enc-trans --with-zlib --with-mhash=/usr/local/mhash --with-libedit=/usr/local/lib --with-imap=/usr/local/imap --with-kerberos --with-openssl

After suiccessfully compiling & installing php.
I restarted the apache webserver which also restarted successfully.

Then i tried to run a small php script but that failed giving me an error <b>Fatal error</b>:  Call to undefined function:  mhash() in <b>test.php</b> on line <b>4</b><br>.

The code is :-
<?php
$hash = bin2hex(mhash(MHASH_CRC32, "sanjeev"));
echo $hash;
?>

Pls. help.
Thanks in advance.
Thnaks &  regards,
Sanjeev.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-11 11:46 UTC] sniper@php.net
Did you try deleting config.cache and then try with your configre line?? 'make clean ; make' might also be a good thing to try..

 [2002-06-12 01:30 UTC] sanjeevp at motechsoftware dot com
Hi,
   I have tried removing the config.cache, make clean and make.. It's not working. Is there some cgi flag to be enabled in the configure.
 [2002-06-12 08:59 UTC] sniper@php.net
Exactly which version of PHP is this? 4.3.0-dev? 4.2.x ?

 [2002-06-13 09:44 UTC] sanjeevp at motechsoftware dot com
The version of php is 4.0.6.
I am runing the php script in the following way:-

/usr/bin/php test.php.

where i get this problem.

If i include any imap function like imap_open in this file too & run using the script.
Then also the script gives me a similar kind of error i.e.
error <b>Fatal error</b>:  Call to undefined function:  imap_open() in
<b>test.php</b> on line <b>4</b><br>.
Pls. help.
Thanks in Advance.
--Sanjeev.
 [2002-06-13 09:53 UTC] sniper@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 19:01:29 2024 UTC