Fatal Error: Allowed Memory Size of 134217728 Bytes Exhausted (CodeIgniter + XML-RPC)

前端 未结 29 2570
天涯浪人
天涯浪人 2020-11-21 22:57

I have a bunch of client point of sale (POS) systems that periodically send new sales data to one centralized database, which stores the data into one big database for repor

29条回答
  •  忘掉有多难
    2020-11-21 23:42

    The memory allocation for PHP can be adjusted permanently, or temporarily.

    Permanently

    You can permanently change the PHP memory allocation two ways.

    If you have access to your php.ini file, you can edit the value for memory_limit to your desire value.

    If you do not have access to your php.ini file (and your webhost allows it), you can override the memory allocation through your .htaccess file. Add php_value memory_limit 128M (or whatever your desired allocation is).

    Temporary

    You can adjust the memory allocation on the fly from within a PHP file. You simply have the code ini_set('memory_limit', '128M'); (or whatever your desired allocation is). You can remove the memory limit (although machine or instance limits may still apply) by setting the value to "-1".

提交回复
热议问题