Hello,
I've got this error:
Fatal error: Cannot redeclare is_mem_available() (previously declared in /.../lib/exe/fetch.php:442) in /.../inc/common.php on line 1438
The error shows up with the use of the gallery plug in while resizing the images with gdlibv2: no thumbnails, no images
calling the URL "http://www.some-web-site.de/lib/exe/fetch.php/some-images.jpg?w=1200&h=800" directy leads to the "Fatal error:..."
This bug may be related to #1633: "
FS#1633 - resizing of *.png images doesn't work in 2009-02-14 any more "
I use the actual version of DokuWike and the following plug ins:
* acl
* cacherevisionserase
* config
* displaywikipage
* gallery
* importoldchangelog
* importoldindex
* indexmenu
* info
* plugin
* popularity
* revert
* usermanager
Bug-Fix - works for my installation :-)
/**
* Checks if the given amount of memory is available
*
* If the memory_get_usage() function is not available the
* function just assumes $bytes of already allocated memory
*
* @param int $mem Size of memory you want to allocate in bytes
* @param int $used already allocated memory (see above)
* @author Filip Oscadal <
webmaster@illusionsoftworks.cz>
* @author Andreas Gohr <
andi@splitbrain.org>
*/
>>> new code
if (!function_exists("is_mem_available"))
{
<<<
function is_mem_available($mem,$bytes=1048576){
$limit = trim(ini_get('memory_limit'));
if(empty($limit)) return true; // no limit set!
// parse limit to bytes
$limit = php_to_byte($limit);
// get used memory if possible
if(function_exists('memory_get_usage')){
$used = memory_get_usage();
}
if($used+$mem > $limit){
return false;
}
return true;
}
>>> new code
}
<<<