Hope someone can help he because I'm at a loss.

I'm trying to set up a PHP local server on my new machine using ISS7 and Windows 7

I seem to have PHP installed correctly and it's linked with the ISS Manager. All of the necessary Window Features are turned on. However when I browse to //localhost/mysite/index.php all I see is the style sheet CSS with the page background color and title, but no php page content.

What am I missing??

~Marty

Dani AI

Generated

When a page renders its CSS and title but none of the expected PHP-generated content appears, the server is delivering the static wrapper while PHP either isn’t being executed or is failing silently. The quickest way to narrow the cause is to verify that PHP is actually being parsed, force error reporting on, and check for common misconfiguration points (short tags, conflicting servers, wrong access protocol).

A minimal verification file placed in the site folder will show whether PHP is running and surface any startup errors:

<?php
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(E_ALL);
echo 'PHP test output';
phpinfo();
?>

Load this via an HTTP URL (for example, ). If the browser displays the phpinfo page, PHP is working and the problem is likely inside the application (includes, paths, database calls, suppressed errors). If the raw PHP appears in the source or the file is downloaded, the web server is not handing .php to the PHP interpreter.

Common causes and fixes:

  • Short PHP tags: replace any <? with full <?php (or enable short_open_tag in php.ini and restart the server).
  • Conflicting servers: ensure IIS is not responding instead of Apache (stop World Wide Web Publishing Service or change Apache’s port) — the Server response header or XAMPP control panel help identify which is active.
  • Error suppression: enable display_errors and check Apache/PHP error logs (XAMPP typically keeps logs under the XAMPP installation folder).
  • File path/includes: use absolute or __DIR__-based paths; switch include to require temporarily to catch missing-file failures.

This approach complements the earlier suggestions from and and the diagnostic prompts by : confirm PHP parsing first (phpinfo), then trace into includes/configuration while keeping error reporting on.

Recommended Answers

All 6 Replies

Marty i run Win 7, but opted for XAMPP over IIS, less confirguration for intial setup

i don't know about ISS or windows server.
but i think you need an apache server on there.

and i also don't know if you want to learn howto do all this.
or you just want to get to php scripting asap.

if so try a wamp server, it's all bundle (Windows Apache MySQL PHP)
easy install: http://www.wampserver.com/en/

Thank you both for your help. I installed XAMPP as suggested but even with Apache over ISS, I still get the same problem. on my LocalHost all I see is the style sheet CSS with the page background color and title, but no php page content.

Member Avatar for Member #120589

Show your code.
Where are your files? Under htdocs or under a folder in htdocs?
Have you set up virtual host in your httpd-vhosts.conf file and a localhost reference in your hosts file?
Silly question - have you given the file a .php extension? Is Apache running (see the XAMPP control panel).

Thank you for your help. In answer to your questions:

  • Where are your files? Under a folder in htdocs
  • Have you set up virtual host in your httpd-vhosts.conf file? I don't understand this part. Could be the problem
  • A localhost reference in your hosts file? Yes
  • Have you given the file a .php extension? Yes
  • Is Apache running? Yes
Member Avatar for Member #120589

OK,if you're running everything under http:// localhost then the vhosts files don't matter too much. It's just when you want multiple sites. Hmm. I really can't say without seeing your code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.