Hello!
It seems that whenever I’ve got a snippet that contains a PHP syntax error I get this error message when I try to display the page that contains the snippet:
[tt]Fatal error: Out of memory (allocated 877395968) (tried to allocate 289479519 bytes) in C:\Documents and Settings\Dunc\My Documents\Web stuff\modx\logic\manager\includes\document.parser.class.inc.php on line 1287[/tt]
For example this snippet:
<?php
echo 'Hello World'
?>
causes this error. Add the missing semi-colon after the [tt]echo[/tt], and it works fine:
<?php
echo 'Hello World';
?>
Should this be happening? I was expecting to get some kind of sensible PHP error back. This seems to happen for both PHP entered in the manager and [tt]included[/tt] in snippets.
My setup is:
Web Server:
PHP Version 5.2.0, running as and apache module
Apache/2.2.3 (Win32)
MySQL Version - 5.0.27-community-nt
OS - Windows XP Pro, SP2
Browser/Client:
Browser - Opera 9, Firefox 2, IE7 (tried all these, doesn’t seem to matter)
OS - Windows XP Pro, SP2 (same machine)
MODx:
Version - Vanilla 0.9.5
Any changes you’ve made - none, except creating my snippet
Any snippets you’re running on the page that is not working properly - none, except the snippet above
Any plugins you’re running - only the defaults.
I’ve searched the forums and Google and read every topic containing the words ’snippet’ and ’memory’ and nothing they suggested works, or applied to my setup. I’ve checked and cleared my logs and cache for MODX, Apache and PHP. I have enough RAM and Disk space and am the only one using this server. I have one admin user logged in to the manager and the page open in another tab.
I get two lines in my apache error.log - one pointing out the PHP error and the second, immediately after, with the out of memory error.
I’ve posted in about this error before, here:
http://modxcms.com/forums/index.php/topic,11955.0.html
but as I didn’t get any replies and I’ve narrowed it down to a simple test case now, I thought I’d give it another go - so, if anyone’s got any ideas, I’d be very grateful if you could help out.
Thanks,
Duncan Lock