Hi, I was very excited to try out this new version of SignIt since a petition module is very important to my Drupal 5 site. Once I got this module going, it works fully except no matter what petition options you choose, a fatal error pops up whenever you try to send any of the signatures. The same happens whether you choose to send out the petition instantly or instead do it from the collected signatures on the overview page.

Here is the exact error that pops up on the blank page right when you try to email them out:

Fatal error: Call to undefined function: hash() in "[my root folder]/public_html/dpal/modules/signit/signit.module on line 1997"

Please let me know if there is anything I can do to solve this problem. Any idea? Thank you.

Comments

arthurf’s picture

Ah, looks like hash() requires php 5.1.2

I'll see if it is easy to work around this, but you may be out of luck here

HallSL’s picture

When you say 5.1.2, do you mean that or later, so that 5.2.1 will work also? Or do you mean that it only works with 5.1.2? Thanks!

arthurf’s picture

Status: Active » Closed (fixed)

Should work with any version greater than 5.1.2. See: http://us2.php.net/hash

best of luck!

seanr’s picture

Component: Miscellaneous » Code
Category: support » bug
Status: Closed (fixed) » Active

You have any idea how many people are stuck on hosts using PHP4.x? I think we really need to find an alternative to the hash function.

arthurf’s picture

While I certinally understand that many people are still on php4, Drupal is moving to be php5+ within a few months and I think it's reasonable to start that movement now. Though the hash function can probably be replaced, there are some critical issues that are needed to be fixed on this module before I can get to that. If you'd like to offer a patch, I'd be glad to accept it.

seanr’s picture

Drupal 6 will not be PHP 5 only, that's for Drupal 7 and later. The module should reflect that as well, since there will be many Drupal 5 and 6 users on PHP 4. I think it's a very bad idea to upgrade to PHP 5 before the main app does since you'll be causing incompatibilities and leaving many users in a lurch.

arthurf’s picture

Hi Seanr-

I'm not going to argue the finer points here- the reality is that php4 is on it's way out, and it's not unreasonable to begin that movement. As I stated, I'd warmly welcome a patch which solves this issue. There are other pressing problems with this module that I'd really like to tackle and if it is of such concern to you, please contribute a patch and I'll make sure that it gets in to the module.

thanks!

arthur

vm’s picture

it's a very bad idea to upgrade to PHP 5 before the main app does since you'll be causing incompatibilities

I don't believe this is sound logic, I use and have always used Drupal 4.7.x & 5.x on PHP5 without incompatibilities.

arthurf’s picture

If you're going to post to this thread about php4 vs. php5, I'm not interested. If you'd like to submit a patch that resolves the issue, I'll embrace it with open arms. Please do contribute code, this project needs it.

thanks

vm’s picture

I'd suggest adding a note to the project page that it only works on PHP 5.1.2 and above. to limit the amount of people who may install using PHP4

seanr’s picture

VeryMisunderstood, I was talking about writing PHP5 modules, not updating your server to PHP5.

arthurf, have a look at this: http://www.php.net/manual/en/function.hash.php#72670