Fatal error: Allowed memory size...

Fatal error: Allowed memory size..., a forum discussion on Jojo CMS. Join us for more discussions on Fatal error: Allowed memory size... on our Administration (backend and configuration) forum.

Back to Forum Index : Back to Administration (backend and configuration)   RSS
Dean

19 Aug 2007
Posts: 11

Hi,

I've got jojo running on my linux server and when I try to edit a page I get this error:

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 146507 bytes) in /home/username/domains/deansdomain.co.nz/jojo/plugins/jojo_core/jojo_core.php on line 47

In the file there is this function below. The $data line is on line 47 in the file.

function fixAnchorLinks($data)
{
//echo $_SERVER['REQUEST_URI'];
$data = preg_replace('/<a([^>]*?)href=["\'](#[a-z0-9-_]*)?["\']([^>]*?)>/i', '<a$1href="'. $_SERVER['REQUEST_URI'].'$2"$3>', $data);
return $data;
}

Anyone know why I have this error?
Dean
Harvey

Core Developer

Harvey

20 Aug 2007
Posts: 327

Hi dean,

We will get back to you shortly. Can you confirm whether this happens when editing all pages, or just on a few pages?

I'd be surprised if it was this function hogging all your memory, though we typically run Jojo on servers with more than 8Mb available and don't often come across these sorts of problems.

Thanks,

Harvey.
Guest

20 Aug 2007
Posts:

Hi Dean,

8Mb is too small to run jojo effectively. I would recommend you change this to 32-64Mb. The admin section ordinarily wouldn't use this amount of memory. And the live side of the site certainly doesn't.

This memory is used to handle file uploads and resizing images. Large images will require a large amount of memory to resize them the first time. After this, they are cached and no longer have the memory requirement.

To change the amount of memory allocated to php edit the memory_limit option in php.ini.
Dean

20 Aug 2007
Posts: 11

Thanks Harvey,

I will have a look again soon. The server's being upgraded to PHP5.2.3 and the latest version of Apache today, so I can't check just at the moment.

Thanks,

Dean
Dean

21 Aug 2007
Posts: 11

Yep, it's all running fine now.

Thanks Harvey.
Dean
Harvey

Core Developer

Harvey

22 Aug 2007
Posts: 327

That was the mike who replied as guest, but I'll take credit anyway :)
Back to Forum Index : Back to Administration (backend and configuration)   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.