PHP Header already sent error on UNIX/Apache but not Win/IIS

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
josefv
Forum Newbie
Posts: 23
Joined: Wed Jan 17, 2007 11:17 am

PHP Header already sent error on UNIX/Apache but not Win/IIS

Post by josefv »

I'm using PHP 5.2.0 on two separate machines. When I work on my site using machine A (Windows with IIS), which works perfectly with my site, hosted locally for testing at home.

When I copy my site to our UNIX server at work, which of course uses Apache, I get errors indicating that headers have already been sent, and the error points to the start_session() function called.

Is there a setting in php.ini or something that is different in the two setups?
User avatar
dibyendrah
Forum Contributor
Posts: 491
Joined: Wed Oct 19, 2005 5:14 am
Location: Nepal
Contact:

Post by dibyendrah »

The problem is due to sending the output to the browser and using header function. Trace the statement which is sending output to the browser before header and your problem is solved.

And regarding the configuration, yes they differs from each other.
Post Reply