TOTAL NoOB/not displaying PHP

Ok, So I bought a book on PHP/MySQL and I installed the lastest version of each including apache 2.

Now I finally got apache running and set my root. But I dont think that my php is being parsed. The code the book says to write is

<!Doctype html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional/EN" "http://www.w3.org/1999/xhtml" xml1-transitional.dtd Blank PHP Script <?php echo 'This is my second PHP script!'; ?>

but when I open it in the browser (yes with the http://localhost rather than file://) it shows just a blank page… and that pisses me off. I spent 7 hours trying to figure it out. I was going absolutley crazy…

any help is appriciated

Don’t know Jack about Apache 2 but try this

view the source of the page… Is the PHP visiable?
If it is…

  1. did you save the file as a .php? when you saved it did you put the name of it in quotes? Ex: “file.php” (I spend 4 days trying to find out wha tthe heck was wrong with mine and that was it)
  2. the apache can’t find the php “translator”. In apache 1 i’d tell you to check out you .ini file but I can’t help you with 2. Guess you would just have top pour over the manual.

Good luck!

Sponsor our Newsletter | Privacy Policy | Terms of Service