Fatal error: Call to undefined function: sha1() in

Hello :) I'm trying to install this wonderful looking package and I keep getting this error when I submit my login info on the setup page:

Fatal error: Fatal error: Call to undefined function: sha1() in /home/httpd/vhosts/xxxx.org/httpdocs/photos/zen/auth_zp.php on line 10

I'm running PHP4.2.2 on RHL9.

I tried switching the sha1 function to md5 (in both places in auth_zp) -- after I do this, I no longer get the error, but nothing happens at all. I click submit, it appears to submit the form, but I'm returned with no apparent action having taken place.

Anyone know if there's a way around this?

Thanks :)


  • I even just tried crypt(), to no avail -- same thing as when I try md5.

    I would love to upgrade my PHP (to the latest 4.x), but I'm a sysadmin newbie and my early attempts to do so have been less-than-successful :(
  • trisweb Administrator
    Make sure you change the sha1 to md5 in both line 10 *and* line 22, where it checks and sets the cookie. You're probably leaving it as sha1 in line 22, because it won't give you an error unless you're logging in explicitly.

    I'll change both to md5 in the future to avoid this problem.
  • Hey :) Thanks for the reply.

    I was making sure to change it on both 10 and 22 (as I note above :) ) and I was still getting the issue.

    As it turns out, changing to md5 was solving that immediate problem and that I was/am having issues with mod-rewrite.

    Once I deleted everything and started from scratch with $conf['mod_rewrite'] = false; then I was able to install.

    Now, before I tackle getting modrewrite working I'd like to figure out why none of the images I upload display (they have weird markup in the img tag -- <img src="/zp/zen/i.php?a=testing&i=einst_9.jpg&s=thumb") ... but I'll search for answers to that and maybe post a new thread if need be.
  • I'm having this exact same issue. I realized that i have php 4.1 installed so i dont have sha1() available to me.. so i switched both lines to md5.. Now it logs in and goes to "page not found"

    I dont really care about the modrewrite.. so i tried it with it set to false.. still nothing..

    The frustrating thing is i installed this perfectly on a linux box with no issues.. works great.. but i'm migrating the web server over to a windows xp box... but now with a new install of apache and php this does not want to work... Like i said i set the modrewrite to false.. but i'm stll getting a page not found after i type my login and password in....

    any help with this would be greatly appreciated!!

  • Your issue might be related to another bug floating around the forum here that has to do with the URL's. I don't have time to find the thread where I read it ...

    When you get the 'page not found' error, what does it say in the address box? Apparently (and it did happen to me) it seems to want to double-up on the /zen/. So, for example:

    All I did was to manually remove the extra /zen/ and reloaded and it went off without a hitch from there.

    Hope that helps :-)
  • trisweb Administrator
    Note that the sha1 bug will definately be fixed for future releases. Sorry about that.
Sign In or Register to comment.