i am using drupal 6, mysql 5.5 on apache 2.2 it is working fine. but when i migrated my code on xampp1.7.3(contain apache2.2 and mysql 5.5). it gives issue and error.

warning: Cannot modify header information - headers already sent by (output started at codefolder\modules\user\user.module:1) in codefolder\includes\session.inc on line 99. warning: session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in codefolder\includes\session.inc on line 102. Blockquote

and after login pages containing urls like localhost/node/55 shows white pages. while without login it works fine.
while searching on google i found this issue might be due to header but i haven't used any header redirect in my .tpl.php files.

3 Answers 3


Check that you don't have any ending php tags at the end of your php files. Sometimes whitespace (spaces, tabs, newlines) will sneak in at the end of the file after the tag and cause php go into html mode and send the headers too early.

  • i haven't modified session.inc and user.module. and there is no any whitespace (spaces, tabs, newlines). though it is working fine on linux with Xampp. on my local i have Windows and Xampp.
    – Sanjay dev
    Commented Aug 16, 2013 at 6:41
  • So do you have any code, like a module, of your own there? If you do, does Drupal run OK with your module disabled? Commented Aug 16, 2013 at 15:16
  • i have created more them 20custom modules as this is an enterprise application.
    – Sanjay dev
    Commented Aug 23, 2013 at 8:30
  • i was using xampp's latest verision, and then used 1.7.3 as i needed apache 2.2, but one friend suggested to use Xampp 1.7.4 and now it works fine.
    – Sanjay dev
    Commented Aug 23, 2013 at 8:33

This is mostly Found in php bust as @Kari Kaariainen said do it and another thing is that go to the top of that page and make sure there is no white space.


This was issue due to verision of XAMPP.
Don't know why but on one friend suggestion I started using XAMPP 1.7.4, and it resolved error, previously i have used XAMPP 1.8.3 and then XAMPP 1.7.3.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.