Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Hosting Requirements /

What you need to consider when choosing a hosting provider and plan.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Missing hash module of php

Go to End

2 Posts   2044 Views


Community Member, 2 Posts

29 September 2010 at 7:46pm

Edited: 29/09/2010 7:47pm

According to Silverstripe requirements(, hash module seems to be necessary. I knew it is default after php 5.2. Anyway, unfortunately that my server(php 5.2.5) does not provide that module.

I checked the source and found that only "hash_algos" is necessary(just seems to be). So I put the following code in the main.php and got the Silverstripe worked.
function hash_algos(){ return Array('md4','md5','sha1','sha256',... ,'haval256,5');}

I am starting to develop a website with this server I mentioned above. Here, I want to ask if hash will cause any kind of fatal problem. Because I really don't want any unsolvable problem in the coming future, especially I cannot change the requirement of this server.

Any advice or comment will be very very appreciated. Thank you.


Forum Moderator, 5523 Posts

30 September 2010 at 8:37pm

Wow I don't think I have ever heard of it being disabled.

I think you need to define 2 functions at least hash() and like you have hash_algos(). Looks like it could work without hash() though. Take a look at PasswordEncryptor::encrypt();