Re: IMagick confusion
| From: | Yeti | Date: | Sat, 22 Nov 2008 14:57:35 +0000 |
| Subject: | Re: IMagick confusion | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-283664@lists.php.net to get a copy of this message | ||
First of all .. always be careful with tainted data.
Like when you
$picture = $_GET['PICTURE'];
be aware that this could be a security risk one day an ImageMagick
exploid is circulating.
At the first glance I saw a syntactical thingy that might cause problems ..
case default:
break;
In PHP switch for default this way ...
switch ($statement) {
case 1:
// do something
break;
default:
//do something else
}
then you forgot a semicolon
$orientation = $image->getImageProperty("exif:Orientation"); // <--- ; added
after that I got your script running.
Note:
At least turn error reporting on during debugging etc.
All error-reporting behavior can be modified at any level, so if you
are on a shared host or otherwise unable to make changes to files such
as php.ini, httpd.conf, or .htaccess, simply ...
ini_set('error_reporting', E_ALL | E_STRICT);
ini_set('display_errors', 'OFF');