Have you tried running the code in an HTML Orompt rather than a Web App?
I run a few PHP apps that way with no issues.
For more information, see the wiki Searching the Forum for Answers section.