dou91855 2014-03-08 17:55
浏览 143
已采纳

按需卸载php模块

I am wondering if anyone know a way to unload php modules on a per script basis. End Goal is to minimize scripts to use as little memory as possible.

Why? The TOP command shows VIRT @ 279m and RES @ 19m. This is with a script that only checks is a variable set and sleeps for 20 seconds thats it.. I am wondering if I can only load the modules I actually need for the script to run.

I have read in the past this was not supported nor encouraged but that was from 2011. If this is not possible is it better to load modules on demand per script? I ask because I am trying to minimize the size of VM's. Be Gentle :)

  • 写回答

1条回答 默认 最新

  • duanjue2576 2014-03-08 18:16
    关注

    The answer from 2011 still stands. You could use different php.ini files, but you'll have to make the decision when starting PHP. It also won't bring you much, just try disabling some extension you don't use and you'll will notice you memory consumption won't be significantly reduced.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!