Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/haskell/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从PHP执行wkhtmltoimage挂起_Php_Symfony_Exec_Wkhtmltoimage - Fatal编程技术网

从PHP执行wkhtmltoimage挂起

从PHP执行wkhtmltoimage挂起,php,symfony,exec,wkhtmltoimage,Php,Symfony,Exec,Wkhtmltoimage,从PHP执行wkhtmltoimage时,它只是挂起 $command = 'wkhtmltoimage --format "png" "' . $url . '" "' . $output . '"'; exec($command); 它将一直挂起,直到PHP超时 我可以直接从CLI运行相同的命令,并且运行良好。 我也尝试过: 添加2>&1和>num2>&1 使用shell\u exec和反勾号 将exec包装在批处理文件中并调用EXIT/B 0 我尝试改用Symfony进程,但出现以下

从PHP执行wkhtmltoimage时,它只是挂起

$command = 'wkhtmltoimage --format "png" "' . $url . '" "' . $output . '"';
exec($command);
它将一直挂起,直到PHP超时

我可以直接从CLI运行相同的命令,并且运行良好。

我也尝试过:

  • 添加
    2>&1
    >num2>&1
  • 使用
    shell\u exec
    和反勾号
  • 将exec包装在批处理文件中并调用
    EXIT/B 0
我尝试改用Symfony进程,但出现以下错误:

Qt: Untested Windows version 6.2 detected!

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
从CLI运行它会产生相同的
Qt:检测到未测试的Windows版本6.2消息,但仍会生成图像。从PHP运行它不会生成图像

你知道如何让wkhtmltoimage从PHP开始工作吗