I am running phpWiki 1.3.11p1 via my university account. Everything has been working fine on php 4.x for several months. The school is upgrading to php 5.1.2 next weekend. My installation is failing on their test system and generating the following error.
Fatal error: Cannot redeclare hash()in /nfs/chernobyl/u1/w/williate/public_html/p1wiki/lib/stdlib.php* on line 1612
I was informed that version 5.1.2 introduced the Hash extension, which is causing the incompatibility. Has anyone else encountered this problem? Are there any quick work arounds until fix is released?
I am fairly windows savy and have some professional programming experience, but I don't know much about Apache/UNIX/PHP. I can probably manage to gather any requested information.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'll prepare a patch and new 1.3.11p2 package today, because 1.3.12 will need more time to fix all link issues, which came up with introducing semantic relations.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am running phpWiki 1.3.11p1 via my university account. Everything has been working fine on php 4.x for several months. The school is upgrading to php 5.1.2 next weekend. My installation is failing on their test system and generating the following error.
Fatal error: Cannot redeclare hash()in /nfs/chernobyl/u1/w/williate/public_html/p1wiki/lib/stdlib.php* on line 1612
I was informed that version 5.1.2 introduced the Hash extension, which is causing the incompatibility. Has anyone else encountered this problem? Are there any quick work arounds until fix is released?
I am fairly windows savy and have some professional programming experience, but I don't know much about Apache/UNIX/PHP. I can probably manage to gather any requested information.
I had the same issue.
Deleting the hash-function in /lib/stdlib.php brought my wiki back up. I did no further testing yet, so far reading the wiki seams to work at least.
Deleting hash function from /lib/stdlib.php produces warnings:
lib/main.php:1213: Warning: hash() expects at least 2 parameters, 1 given
lib/main.php:1214: Warning: hash() expects at least 2 parameters, 1 given
I tried to add "md5" into hash function, but new warnings appear:
lib/main.php:1213: Warning: hash() expects parameter 2 to be string, array given
lib/main.php:1214: Warning: hash() expects parameter 2 to be string, array given
1) Any idea how to fix the warning?
2) Is it possible to disable warnings? (How?)
Please rename all function calls to hash()
and the hash definition itself from hash to wikihash.
lib/stdlib.php:1591 (just the definition)
lib/main.php:1229 + 1230
lib/plugin/RateIt.php:217 + 234
lib/Request.php:1159
I'll prepare a patch and new 1.3.11p2 package today, because 1.3.12 will need more time to fix all link issues, which came up with introducing semantic relations.
In lib/WikiUserNew.php there is another declaration of hash():
function hash () {
return hash($this->_prefs);
}
Please, include fix for this file as well
yes, already done.
Please see phpwiki-1.3.12_rc1.tar.bz2 in the download area.