some error with svg

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
kireyev
Posts: 1
Joined: 2013-12-09T10:12:13-07:00
Authentication code: 6789

some error with svg

Post by kireyev »

Evrebody hello!
First of all sorry for my english.
I have error:
Fatal error: Uncaught exception 'ImagickException' with message 'unable to open file `/var/tmp/magick-s7gkOlxK': No such file or directory @ error/constitute.c/ReadImage/571' in /www/presentp/users/presentp-new/www/htdocs/index.php:4 Stack trace: #0 /www/presentp/users/presentp-new/www/htdocs/index.php(4): Imagick->readimageblob('<?xml version="...') #1 {main} thrown in /www/presentp/users/presentp-new/www/htdocs/index.php on line 4
on this code:

Code: Select all

<?
$im = new Imagick();
$svg = file_get_contents("/www/presentp/users/presentp-new/www/htdocs/tuborg.svg");
$im->readImageBlob($svg);
$im->setImageFormat("png24");
header("Content-Type: image/png"); 
echo $im;
?>
Here's phpinfo: http://new.presentprint.ru/info.php
Here's svg file: http://new.presentprint.ru/tuborg.svg

If i change svg to another format (jpg or other) my code is working, but with svg it doesn't.
Pls, help!
Post Reply