Error during installation -- sha256 does not exist.
Summary
After clicking the "run the installer" button, I get this error:
Uncaught Exception
ini_set(): session.configuration 'session.hash_function' must be existing hash function. sha256 does not exist.
Origin
system/session.php on line 9
Trace
#0 [internal function]: System\Error::native(2, 'ini_set(): sess...', '/sites/martijnb...', 9, Array)
#1 /sites/martijnbrekelmans.com/www/blog/system/session.php(9): ini_set('session.hash_fu...', 'sha256')
#2 /sites/martijnbrekelmans.com/www/blog/system/start.php(36): System\Session::setOptions(Array)
#3 /sites/martijnbrekelmans.com/www/blog/install/index.php(33): require('/sites/martijnb...')
#4 {main}
Expected Behaviour
Installer should run
Actual Behaviour
Installer crashed
Context details (if applicable)
I've created a separate folder for this issue report. https://martijnbrekelmans.com/reproduce-error
Additionally, the hash output of phpinfo on the server
hash
hash support enabled
Hashing Engines md2 md4 md5 sha1 sha224 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost gost-crypto adler32 crc32 crc32b fnv132 fnv1a32 fnv164 fnv1a64 joaat 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
I'm not quite sure what's going on here. The error reporter tells us that the error happens at ini_set('session.hash_function', 'sha256');, yet when I try to reproduce the error on another page
<?php
ini_set('session.hash_function', 'sha256');
?>
It doesn't fail at all!
I found a workaround, I tried setting hash_function to md5, but don't know why this works. And I'm also security-illiterate, yet don't believe using md5 is a good idea.
Config::set("session.hash_function", "md5");
Hmm, interesting bug. Sadly I can't personally help with this one. Hopefully someone else can pick it up. Thanks for the detailed information @Azeirah!
I'm looking into this, but it seems to be an issue with php 5.6, so downgrading to 5.5 should work. Thanks to jraycroft from the forums.
Hi, Got the same issue here with php 7.0.13 (on freebsd)
It seems that this is an issue with PHP rather than Anchor... There's nothing we can really do to fix this except create a fallback.
It's hard to do any extra work on this though, because I can't manage to reproduce this, or get onto a server that can...
Just ran into this running PHP 5.6.28.
Have you tried a different version? @frozenpandaman
@CraigChilds94 I didn't try out PHP 7.1 or 7.2 (the other options I have besides 5.6) as I was guessing it'd be similar to @lpoujade's case where 7.0 didn't work, also on FreeBSD. However, I only encountered this error with Anchor 0.12.3 (and 4d7f0ed)… 0.12.1 behaves fine, and is what I was using before (moving hosting providers so having to migrate all my SQL stuff, and was trying to upgrade my Anchor installation in the process). So no worries, just wanted to note it. :)
I ran into this with nearlyfreespeech installer fails with php5.6. 7.1 works
@freddytwonotes I also ran into this issue on NFSN, fwiw.
Hi! I have the exact same problem. I tried with PHP 5.6 (at that point I've got another problem with symphony dependency), 7.0(the same), 7.1 and 7.2 (sha...). All on the shared hosting based on FreeBSD, and allways this error.
I checked phpinfo and exists sth like sha256 algorithm.

I also have this issue on Dreamhost PHP 7.0 FastCGI
Just curious... Put phpinfo() somewhere in the anchor setup... I'm going to take a very blind stab and suggest that maybe Anchor isn't being called by the same PHP that you're checking with? Because this literally shouldn't work like that?