1. Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Rep Power

    Moving PHP & MySQL to win2000 from Linux

    Please see "moved from MySQL" for original thread.

    This originally worked on my Linux box but I now get
    Warning: Cannot modify header information - headers already sent by (output started at c:\Inetpub\wwwroot\auth.php:214) in c:\inetpub\wwwroot\company\updatecompany.php on line 22
    when I submit changes via a php page.
    I know what causes this error (printing to screen before switch statement)
    but I cannot figure out why it used to work and now gives this error.
    The only thing that comes before my swtch statement is my auth page which has the session_start etc in it.
    The only thing I can think of is :
    The auth page has a line
    PHP Code:
    if (!$user_id)   {   print the login page   
    If the $user_id didnt exist, I guess then it would consider that to be printing the login page before the switch statement..... but the rest of the page works so why would it think there is no $user)id?

    When I first moved this (as you could see previously in this thread) I had issues because ALL error reporting was turnder on and it was saying that any undefined variable was wrong.
    (eg - if there was something like if (!$var), it was saying that $var was wrong and giving me errors)
    Switching the errors handling to E_ALL & ~Notices fixed that. But I guess if still thinks $var is wrong and simply not reporting on it, then it would try to print the login page. I guess???
    Last edited by Ricta; January 13th, 2004 at 04:26 PM.

IMN logo majestic logo threadwatch logo seochat tools logo