0

Possible Duplicate:
“Warning: Headers already sent” in PHP

I have installed phpBB over IIS 7.5 and the home is showing withouth CSS.

Console on Chrome shows "Resource interpreted as Stylesheet but transferred with MIME type text/html" and IE shows a similar error.

Point is, there is a CSS being dynamically generated with PHP and it's the one with the issue.

The style.php file already has this:

header('Content-type: text/css; charset=UTF-8');

I believe I'm missing something on the App settings on IIS but Google has not been very helpfull.

Community
  • 1
  • 1
er_tomas
  • 59
  • 8
  • Did you make sure that the SAPI you use can send headers? – Oswald Nov 09 '12 at 14:19
  • 1
    If it's sent with PHPs default MIME type, then your header() wasn't processed. Enable error_reporting and/or read: possible dupliacte of [Headers already sent](http://stackoverflow.com/questions/8028957/headers-already-sent-by-php) – mario Nov 09 '12 at 14:19
  • I forgot to mention that the problem is on IIS only. I have tried the same app install on Apache httpd and it works fine. The error reporting should be enabled on PHP or IIS? – er_tomas Nov 09 '12 at 14:23
  • @Oswald I'm not sure what you mean? – er_tomas Nov 09 '12 at 14:25
  • A [SAPI](http://en.wikipedia.org/wiki/Server_Application_Programming_Interface) is responsible for the communication between PHP and the web server. There are different kinds of SAPIs, such as an Apache module, CGI, FastCGI. Not all of them can process the [header()](http://www.php.net/manual/en/function.header.php) call. – Oswald Nov 09 '12 at 14:31
  • @Oswald I'm using FastCGI. Will check if it can send headers and report back. – er_tomas Nov 09 '12 at 14:33
  • @Oswald I assume FastCGI allows headers as there's not much info about it? – er_tomas Nov 09 '12 at 15:18
  • Excuse me but why was this question closed? The title might be similar to others but none of the other questions resolved my problem. I have done a fair amount of research before asking. – er_tomas Nov 12 '12 at 21:35

0 Answers0