I found the error on my own, which is not completely evident in the posted snippet:
There where many includes with relative paths in the php scripts. And relative paths for include
are handled differently for /var/www/mypage
and ~/public_html/mypage
.
The former one considers relative paths relative to the running script file location, whereas the latter one handles relative paths relative to the main dir (~/public_html/mypage
).
As in the latter case the included php files where not found, the php tags where dumped instead of interpreted by the apache server.
I use the default apache2 configuration for Ubuntu 12.10, except that I enabled the userdir.