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 WPF 大屏看板表格背景图片设置
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示