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?

neoliminal - September 27, 2006 - 17:33

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

anner - September 27, 2006 - 17:42

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

bohemicus - September 27, 2006 - 17:52

Sounds like a server issue to me. Have you tried running another PHP file, such as phpinfo?

Yes, this is a server

Gman - September 27, 2006 - 19:44

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

bransam - September 27, 2006 - 19:51

Is this my hosting's problem, or something I'm doing wrong?

Is it just index.php? Try

criznach - September 28, 2006 - 04:16

Is it just index.php? Try putting a file like the one below in your web root and see if it renders...

<?php
echo "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.

 
 

Drupal is a registered trademark of Dries Buytaert.