drxm72811 2012-10-10 19:39
浏览 9

too long

I have an error 500 with this code:

require_once FCPATH.'application/helpers/dompdf/dompdf_config.inc.php';
$dompdf = new DOMPDF();
$dompdf->load_html( $html );
$dompdf->render();
$pdf = $dompdf->output();
file_put_contents( './tmp/'.$filename.'.pdf' , $pdf );

With some debug, I find that the "evil" code is this

$dompdf->load_html( $html );

And I don't know how to solve this.

Even the "ini_set" instruction with memory_limit and max_execution_time doesn't fix this problem..

  • 写回答

1条回答 默认 最新

  • doujiu8178 2012-10-12 03:12
    关注
    1. Follow the advice in this SO question. PHP is probably bubbling the error up to Apache.

    2. Check the permissions on the file and parent folders of application/helpers/dompdf/dompdf_config.inc.php, ensure they are readable.

    3. I believe that if you see a 500 error in the access log, there will also be a report in the error log. If not, the error is coming from PHP. Check your server logs. See /var/log/apache2/error.log and var/log/apache2/access.log on Linux.

    评论

报告相同问题?

悬赏问题

  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)
  • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
  • ¥15 Arduino无法同时连接多个hx711模块,如何解决?
  • ¥50 需求一个up主付费课程
  • ¥20 模型在y分布之外的数据上预测能力不好如何解决