View Full Version : Configuration error?

11-03-2010, 07:12 PM
I'm not sure if this is the right forum to post this in or not ...

I'm just starting to learn php. I'm using wamp server as a localhost, offline on my machine only, v2.2.11 with php 5.3.0. I have set php.ini for error_reporting = E_ALL.
The following code generates a blank screen where I would expect an error as nofile.php does not exist.

<!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">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>



In fact, I can get no php code to run at all. In viewing the page source in firefox 3.6.12 I see the php code in italic. I have tried uninstalling wamp, deleting directories and reinstalling. Same with firefox and deleted all personal settings as well. I have spoken to everyone I know about this but nobody has a clue.

Last year I worked with php a little and had no problems so I'm thinking this must be a setting someplace because it is universal that php code is ignored. Could it be that apache isn't configured properly so it isn't returning php to the browser? Can someone point me in the right direction with this?


11-03-2010, 07:40 PM
Make sure your file has a file extension of .php and not .htm / .html

11-03-2010, 07:54 PM
I'm sorry .. I should have mentioned that. Yes .. all my files have the php extension.

11-03-2010, 07:58 PM
After u install wamp and go to "http://localhost/" what do you see?

11-03-2010, 08:06 PM
It's probably easier to give a screen shot ...

11-03-2010, 08:17 PM
Seems fine. Create a "test.php" in your www folder (assuming you didn't change that in apache config) and add this line to it

<?php phpinfo(); ?>

then check if there's anything at http://localhost/test.php

11-03-2010, 10:11 PM
Thank you Shadow ... I figured it out. When I opened the file with Firefox I got the blank screen .. but clicking on the link you offered opened the file correctly. That sparked my mind to realize it was a mistake in setting up the site in Dreamweaver so the files weren't being opened through apache.

Thanks so much!