parapet74 Posted March 16, 2011 Report Share Posted March 16, 2011 Php code is not being executed. My config: WinXP P5 2Gb/500Gb XAMPP (latest DL) -- also tried with WAMPSERVER (latest DL) Firefox, Chrome, Opera and Safari (all current) HTML renders, but php is skipped. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset utf-0" /> <title>SESSIONS TUTORIAL</title> </head> <body> <h2>This displays correctly</h2> <br> <p> <?php echo "This does not display" ; ?> </p> </body> </html> I have tried: - switching from WAMP to XAMPP and back - reinstall each of the above (just the "out of box" config, but ensured Apache is running) - full reimage/restore of C:, then reinstall each of the above - tried in all browsers - <?php ... ?> (using long tags) - with / without semi-colon after echo statement I'm new to PHP and to programming, so I'm probably missing something embarrassingly basic. Either in the code, or in my WAMP setup. Au secours? Quote Link to comment Share on other sites More sharing options...
falkencreative Posted March 16, 2011 Report Share Posted March 16, 2011 A couple things to check... -- Your file ends in .php, correct? -- When you are testing your file, WAMP or XAMPP is running? -- When you are testing your file, you are viewing it using localhost? Quote Link to comment Share on other sites More sharing options...
parapet74 Posted March 17, 2011 Author Report Share Posted March 17, 2011 Thanks for the speedy reply. Yes to all of your questions. EXCEPT... as I'm thinking about it... the third one. I was entering this address into the address bar: file:///c:/xampp/htdocs/killerphp/index.php -- which *is* on my localhost... but your reply got me thinking... Typing http://localhost/killerphp/index.php worked. Embarrassingly basic. Thanks for the brain nudge. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted March 17, 2011 Report Share Posted March 17, 2011 No worries, it happens. Glad to help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.