dongra1984 2012-01-12 04:40
浏览 131
已采纳

增加内存限制

My php script creates PDF on fly, the data comes from mysql db table it works fine till 30 records but more than that it says

I am dompdf from http://code.google.com/p/dompdf/

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 56214 bytes) in F:\xampp\htdocs\wiseworker\dompdf\lib\class.pdf.php on line 3043

however I have used ini_set("memory_limit","96550M"); and also set in php.ini

; Maximum amount of memory a script may consume (5120MB)
; http://php.net/memory-limit
memory_limit = 96550M

I also increase query execution time

if( !ini_get('safe_mode') ){
        set_time_limit(0);
    }

but it just limited around 45bytes to 65bytes and what will happen if mysql table contain hundreds of records?

  • 写回答

4条回答 默认 最新

  • douxie1692 2012-07-08 13:56
    关注

    Ok thanks to all I just need to set memory_limit = 94G in dompdf class and now it is creating large pdf but after some minutes browser says "The connection was reset - The connection to the server was reset while the page was loading. etc...." although I increase the execution time up to 3600 sec //ini_set('max_execution_time', 3600)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 mmocr的训练错误,结果全为0
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀