[英]imagemagick doesn't work
I can't make imagemagick work.. 我无法使imagemagick工作..
CHMOD is set to 777
CHMOD设置为
777
I found the error log.. no error concerning imagemagick is reported.. I just made up an error to check if it was the correct error.log - and it was... 我找到了错误日志..没有报告有关imagemagick的错误..我只是编错了一个错误,以检查它是否是正确的error.log-它是...
[Thu Nov 03 14:47:49 2011] [error] [client 94.145.177.221] PHP Notice: Use of undefined constant sd - assumed 'sd' in /var/www/_im.php on line 24
Here is the code 这是代码
$base = $_SERVER['DOCUMENT_ROOT'].'/';
$src = $base.'invoice.pdf';
$dst = $base.'invoice.png';
$syntax = '/usr/local/bin/convert -debug coders -log "%u %m:%l %e" '.$src.' '.$dst;
echo $syntax;
exec($syntax);
is_file($src)
returns true is_file($src)
返回true
你应该叫convert
与-debug coder
(而不是coder- S)。
If you are unable to locate your webservers/vhosts error.log
this can oftentimes help to figure out some problems: 如果您找不到webservers / vhosts
error.log
这通常可以帮助您解决一些问题:
print `sh -c "/usr/local/bin/convert -help" 2>&1`;
(Except it's blockend via safe_mode and open_basedir as well. But you would have found out with a PHP warning, unless you had turned them off.) (除了它也是通过safe_mode和open_basedir进行的阻止。但是,除非您将其关闭,否则您将发现PHP警告。)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.