phpBB Version: 3.0.3
Gallery Component: files of the gallery/-directory
Gallery-Link
PHP Version: 5.2.6
Database Version: 5.0.51a
Errormessage:
- Code: Select all
Warning: readfile() has been disabled for security reasons
Errordescription and message
This it not a support request, a suggestion only
If php is on safe mode, readfile function is not available, so image.php and thumbnail.php does not show images, a blank page only.
I have modified both scripts adding an extra check for readfile (it is a sample only)
- Code: Select all
if (@readfile($phpbb_root_path . GALLERY_CACHE_PATH . $image_data['image_thumbnail']) == false)
{
$fp = @fopen($phpbb_root_path . GALLERY_CACHE_PATH . $image_data['image_thumbnail'], 'rb');
if ($fp !== false)
{
while (!feof($fp))
{
echo fread($fp, 8192);
}
fclose($fp);
}
}
flush();
and it works perfectly.
Cheers.


