Wedge
Public area => The Pub => Bug reports => Topic started by: Anthony` on November 7th, 2012, 12:41 AM
-
When I try to run the "Check all files against current versions" task, the page is blank and nothing happens. No errors anywhere.
I went through the source code and I believe it is the exec() function call in the media_handler::testImageMagick() method which is hanging PHP. I don't have ImageMagick installed on my system, so I'm assuming that's why it hangs.
This is the code in Subs-Admin.php which allows this to happen due to some logic error,
// ImageMagick?
if (in_array('imagick', $checkFor))
{
$data = array();
if (media_handler::testIMagick())
{
$data['imagick'] = true;
$imagick = new Imagick;
$data['imagick_ver'] = $imagick->getVersion();
$imv = $data['imagick_ver']['versionString'];
}
if (media_handler::testMW())
{
$data['mw'] = true;
$data['mw_ver'] = MagickGetVersion();
$imv = $data['mw_ver'][0];
}
if ($im_ver = media_handler::testImageMagick())
$imv = $im_ver;
if (isset($imv))
$versions['imagick'] = array(
'title' => $txt['support_imagemagick'],
'version' => $tick . ' (' . $imv . ')</em><br>
' . $txt['support_imagick'] . ': <em>' . (isset($data['imagick']) ? $tick . ' ' . $txt['support_available'] : $untick . ' ' . $txt['support_not_available']) . '</em><br>
' . $txt['support_MW'] . ': <em>' . (isset($data['mw']) ? $tick . ' ' . $txt['support_available'] : $untick . ' ' . $txt['support_not_available']), // don't end the /em tag! The template already does that...
);
else
$versions['imagick'] = array('title' => $txt['support_imagemagick'], 'version' => $untick . ' ' . $txt['support_not_available']);
}
If the check for ImageMagick fails in the first if block, why would it later "test" ImageMagick regardless?
After adjusting the code, the page loads fine.
-
Because there are multiple different ways ImageMagick can be configured - there are something like 3 separate and different bridges to PHP, which may all have different version numbers...
-
Has this been fixed yet?
-
No patches mentioned here(http://wedge.org/pub/feats/6108/new-revs/).