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.

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

报告相同问题?

悬赏问题

  • ¥15 求大家看看Nonce如何配置
  • ¥15 Matlab怎么求解含参的二重积分?
  • ¥15 苹果手机突然连不上wifi了?
  • ¥15 cgictest.cgi文件无法访问
  • ¥20 删除和修改功能无法调用
  • ¥15 kafka topic 所有分副本数修改
  • ¥15 小程序中fit格式等运动数据文件怎样实现可视化?(包含心率信息))
  • ¥15 如何利用mmdetection3d中的get_flops.py文件计算fcos3d方法的flops?
  • ¥40 串口调试助手打开串口后,keil5的代码就停止了
  • ¥15 电脑最近经常蓝屏,求大家看看哪的问题