imagemagick 不起作用

发布于 2024-12-13 09:01:14 字数 614 浏览 1 评论 0原文

我无法使 imagemagick 工作..

编辑

CHMOD 设置为 777

我找到了错误日志.. 没有报告有关 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

这是代码

$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) 返回 true

I can't make imagemagick work..

edit

CHMOD is set to 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...

[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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

柠檬色的秋千 2024-12-20 09:01:14

如果您无法找到您的网络服务器/虚拟主机错误。 log 这通常可以帮助解决一些问题:(

 print `sh -c "/usr/local/bin/convert -help" 2>&1`;

除了它也通过 safe_mode 和 open_basedir 进行阻塞。但是你会发现 PHP 警告,除非你关闭了它们。)

If you are unable to locate your webservers/vhosts error.log this can oftentimes help to figure out some problems:

 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.)

愿得七秒忆 2024-12-20 09:01:14

您应该使用 -debug coder (而不是 coder-s)调用 convert

You should call convert with -debug coder (instead of coder-s).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文