Hash() and MySQL Views


#1

Hey everyone!

I recently uploaded one of my projects to show off to a potential employer and was surprised to find two problems.

  1. php’s hash() function was not found. I suppose I just have to write my own / copy it from a different source and post it… any other thoughts?

  2. I uploaded my entire database from a text file in MySQL just to find that my Views were not allowed - it says I need super privilege, or something along those lines. I’d much rather be able to use views than change all my code that relied on views - how can I fix this?

Thanks for your time!


#2

According to my phpinfo for 5.2.6, hash is there:
hash

hash support enabled
Hashing Engines md2 md4 md5 sha1 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru gost adler32 crc32 crc32b haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5

-Scott


#3

Documentation: " The Hash extension requires no external libraries and is enabled by default as of PHP 5.1.2. It may be explicitly disabled by using the --disable-hash switch to configure. Earlier versions of PHP may incorporate the Hash extension by installing the » PECL module."

Customer since 2000 :cool: openvein.org


#4

Fatal error: Call to undefined function: hash() in /home/.idiotic/bitlather/bitlather.com/pett/inc/utilities.php on line 10

then what does that mean?


#5

and apparently views are not allowed… a bit ridiculous, I think, but I’m sure there’s a reason…

support sent me an email on how to get around hash(), seems like a little bit of work that I’ll check out at a later date. Does hash() work for you guys without doing anything?


#6

The example from http://php.net works for me:

<?php echo hash('ripemd160', 'The quick brown fox jumped over the lazy dog.'); ?>

#7

I though that Views were stored on the server separately from your database, but that’s just a guess. If so, then there’s probably no mechanism in place to assign views to users within the DreamHost configuration.

-Scott


#8

Have you checked to make sure you are running PHP 5.1.2 and that it wasn’t compiled with the hash library disabled? That was the point of quoting the documentation and indicating that it works for us using PHP 5.2.x which DH has installed for CGI.

Customer since 2000 :cool: openvein.org