Page 1 of 1

Help configuring PHP, Expression Web 2 and MEDS

Posted: Wed Sep 03, 2008 1:02 pm
by Spiff59
I tried the tutorials, and ran a search or two with no luck, so here goes...
Am a first-time PHP user and am wanting to be able to test pages locally with Expression Web 2. I've installed PHP 5.2.5 (into C:/program files/php) and pointed Expression Web to php-cgi.exe in that folder. I used the php.ini-recommended file as the basis for my php.ini and following instructions turned on display_errors and set cgi.force_redirect to off.

I created a basic PHP test page as follows:

Code: Select all

<!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 content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Test</title>
</head>
<body>
<? php
print "Hello world.";
echo phpinfo();
?>
 
</body>
</html>
When I try to "preview in browser" Expression Web does kick off the Microsoft Expression Development Server, but the displayed webpage is blank. Clicking "page/view source" in IE shows that the code is intact.

I'm not sure if this is related, but I renamed a working htm page to php and tried to bring it up in MEDS and the html code does display, except none of the images show up, just red-X boxes. The paths worked fine when it was an htm page...

Any ideas?
Thank you very much.

Edit: Scratch part-one of my question. An extra space cut-and-pasted from a web example was forcing a syntax error. My test page now displays. I'm still wondering why my images disappear when I rename an .htm to a .php? Thanks.

Re: Help configuring PHP, Expression Web 2 and MEDS

Posted: Thu Sep 04, 2008 10:18 pm
by CalSchrotenboer
Usually when debugging a path issue, the exact syntax of the path which is failing is critical. Your basic PHP test page does not include any references to images. Could you please include one or more examples of the image path references which are failing.

If you simply add the following line to your basic PHP test page, it displays just fine: <img src="http://travelswithcal.com/silverlightsl ... Connor.jpg" alt="Connor" />