Hello,
If you're getting raw php code, then apache/php didn't send it to the correct handler. In theory, if it were a config issue, it should be generating the issue every time. When issues are random, that tends to imply a c code bug (not with the SM php script).... memory going places it shouldn't.. or something like that. If it is a php code bug.. php4 is EOL (end of life), so there won't be any fixes for it, and you'd have to update to php5.
I'm not sure, but it might also be the ram, if it's not saving things correctly, going on the similar theory of memory corruption as before, just by a different means. (this is just a random guess).
However, if there have been other reports of the same issue (with it showing code randomly), the it's more likely a bug in php itself. In theory, nothing Squirrelmail does should cause it to spit out raw code.. (php is supposed to throw it's own errors) However, it's possible that the conditions to duplciate the php bug are only done by SquirrelMail, thus exposing the php4 issue.. as SM is a fairly complex bit of php coding using the more advanced features of php.
Again, this is all "in theory" .. and my best guess... If it's true, you can only update to php5, as php4 is EOL. (EOL=SOL

)
John