Moodle可用于PHP的内存

This is the error I'm getting using some features of moodle on a shared hosting provider:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to 
allocate 76 bytes) in /home/myusername/public_html/lib/moodlelib.php on line 8071

First I thought the php memory limit was set too low, but 64MB seems perfectly acceptable... Is moodle so memory-hungry that it would need more than that?

If that's the case, and considering I'm using a shared hosting and that it's likely unlikely they will increase the memory limit just for me, how can I work around it?

I'm using moodle 2.4.3.

64MB seems perfectly acceptable... Is moodle so memory-hungry that it would need more than that?

In short: yes!

We used to have the same problem. Our php.ini's memory_limit setting has been set to 256M for quite some time. (We're currently using Moodle 2.6, but we saw this problem with 2.1 or 2.2 if memory serves.)

Memory use will vary with Moodle use, of course, but we kept on increasing the setting by 32Mb until the problem went away. (We do run our own servers so adding physical memory is a no-brainer.)

Moodle provides a function to raise memory limit. If you do not have access to the php.ini file, you can configure Moodle to do so.

Edit the config.php file within the moodle root directory. Add raise_memory_limit(MEMORY_STANDARD); or raise_memory_limit(MEMORY_EXTRA); to the end of that file (somewhere behind require_once([...]setup.php');).