php code showing in browser rather than rendered HTML
bransam - September 27, 2006 - 17:19
Anyone have any idea why my index.php code is showing in my browser rather than the rendered HTML? I know this should be obvious to me, but I'm working on two hours sleep :(
Amy

Show link?
My best guess is that you have an open <code> or <pre> tag somewhere and you need to close it.
Are you sure you picked your
Are you sure you picked your php as your input type?
Can you post a sample? This might be it, depending: Junk {head} {styles} codes as output http://drupal.org/node/42080
Sounds like a server issue
Sounds like a server issue to me. Have you tried running another PHP file, such as phpinfo?
Yes, this is a server
Yes, this is a server problem. Many base setups only look to render .htm or .html files. You need to tell them to all look for .php files and execute them as well. Otherwise they will just render them as txt files. -Gman
phpinfo shows only code as well
Is this my hosting's problem, or something I'm doing wrong?
Is it just index.php? Try
Is it just index.php? Try putting a file like the one below in your web root and see if it renders...
<?phpecho "hello";
?>
If it doesn't work, then it's probably a php/server issue. If it does work, check that the opening php tag in your index.php is ok. Also, check the opening php tag on any modules or theme files you've recently opened.