Thomas Posted October 17, 2009 Report Share Posted October 17, 2009 Hey All, Nabeel, Or anybody else who can help, heres my problem... When i go to: (download fspaxconfig) i get this error: Warning: Cannot modify header information - headers already sent by (output started at /home3/pulseair/public_html/members/core/modules/Mail/Mail.php:131) in /home3/pulseair/public_html/members/core/modules/ACARS/ACARS.php on line 106 menu_name=Pulse Air :: Members Area; base_url=http://members.pulseair.co.uk; path_stats=index.php/acars; path_export=action.php/acars/fspax; username=PLS0012; password=none; and also when i go to: http://members.pulseair.co.uk/action.php/acars/fsacarsconfig (download fsacars config) i get this error... Warning: Cannot modify header information - headers already sent by (output started at /home3/pulseair/public_html/members/core/modules/Mail/Mail.php:131) in /home3/pulseair/public_html/members/core/modules/ACARS/ACARS.php on line 81 [Log] Log=http://members.pulseair.co.uk/action.php/ACARS/fsacars/pirep Mail= URL=http://members.pulseair.co.uk/action.php/ACARS/fsacars passwd= [FSacars] CompanyICAO=PLS CompanyName=Pulse Air :: Members Area CompanySite=http://members.pulseair.co.uk UnitSystem=GB Remarks=RMK/ UseLocal=0 PilotNumber=PLS0012 CompanyIATA=FLIGHT # CallsignUses= AcarsSite=http://members.pulseair.co.uk/action.php/ACARS/fsacars/acars StatusSite=http://members.pulseair.co.uk/action.php/ACARS/fsacars/status FPSite=http://members.pulseair.co.uk/action.php/ACARS/fsacars/flightplans AcarsUplinkResetSite= AcarsUplinkSite= Antic= [Events] UseCargo=0 FlapsEvent=1 ToutchDownEvent=1 TOLDPosEvent=1 TOCTODEvent=1 ComFreqEvent=1 GearEvent=1 FlightLengthEvent=1 VrV2Event=1 PIREPEvent=1 FlightPosEvent=1 N1Event=1 DurationEvent=1 FuelEvent=1 WeightEvent=1 MetarsEvent=1 DistLandEvent=1 [Realism] NoSlew=0 NoPause=0 Crash=0 PIC=0 MinReset=0 MaxReset=0 Wave= [sendLog] Password=0 PilotNumber=1 Date=1 Hour=1 Callsign=1 IATAN=1 Regist=1 Depart=1 Arrival=1 Alternate=1 PlaneType=1 SpentFuel=1 IniFuel=0 EndFuel=0 Dur=1 Len=1 TD=1 ZFW=1 Log=1 Version=1 Ive realised that it is actually giving the code(s) however not as a downloadable txt/cfg file, any ideas? Thanks, Thomas. Quote Link to comment Share on other sites More sharing options...
Thomas Posted October 17, 2009 Author Report Share Posted October 17, 2009 Anybody Please? Quote Link to comment Share on other sites More sharing options...
G-NEWC Posted October 17, 2009 Report Share Posted October 17, 2009 Jesus christ, if people are going to help you need to give them a bit of space and time to reply! It's not the first time you've done it, either. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted October 18, 2009 Administrators Report Share Posted October 18, 2009 Looks like the Mail plugin is spitting out code or outputting something which is causing the error Quote Link to comment Share on other sites More sharing options...
Thomas Posted October 18, 2009 Author Report Share Posted October 18, 2009 Hey Nabeel, First of all, thanks for replying, This is the code for the Mail.php, seems to be fine to me, <?php class Mail extends CodonModule { function Controller() { switch($this->get->page) { case 'inbox': if(!Auth::LoggedIn()) { echo 'You must be logged in to use the mail system'; return; } $pid = PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid); Template::Set('mail', MailData::getallmail($pid)); Template::Set('pilotcode', PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid)); Template::Show('mail_inbox.tpl'); break; case 'item': if(!Auth::LoggedIn()) { echo 'You must be logged in to use the mail system'; return; } $mailid = $_GET['mailid']; $result = MailData::getmailitem($mailid); Template::Set('mail', $result); Template::Show('mail_open.tpl'); break; case 'new': if(!Auth::LoggedIn()) { echo 'You must be logged in to use the mail system'; return; } Template::Set('pilotcode', PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid)); Template::Show('mail_new.tpl'); break; case 'send': if(!Auth::LoggedIn()) { echo 'You must be logged in to use the mail system'; return; } $username=$_POST[username]; $whofrom=$_POST[whofrom]; $subject=$_POST[subject]; $message=$_POST[message]; Template::Set('pilotcode', PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid)); $sql="INSERT INTO airmail (username, whofrom, subject, message, date, time) VALUES ('$username', '$whofrom', '$subject', '$message', NOW(), NOW())"; DB::query($sql); echo "<center><h2>AIRmail sent!</h2></center>"; Template::Show('mail_menu.tpl'); break; case 'sent': if(!Auth::LoggedIn()) { echo 'You must be logged in to use the mail system'; return; } $pid = PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid); Template::Set('mail', MailData::getsentmail($pid)); Template::Set('pilotcode', PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid)); Template::Show('mail_sentitems.tpl'); break; case 'delete': if(!Auth::LoggedIn()) { echo 'You must be logged in to use the mail system'; return; } $mailid = $_GET['mailid']; $result = MailData::deletemailitem($mailid); Template::Set('mail', $result); Template::Show('mail_deleted.tpl'); break; case 'reply': if(!Auth::LoggedIn()) { echo 'You must be logged in to use the mail system'; return; } $mailid = $_GET['mailid']; $result = MailData::getmailcontent($mailid); Template::Set('mail', $result); Template::Show('mail_reply.tpl'); } } } ?> Quote Link to comment Share on other sites More sharing options...
Thomas Posted October 18, 2009 Author Report Share Posted October 18, 2009 Also, As it said there was a problem on line 81, Here is the line 81 in the ACARS.php: header('Content-Length: ' . strlen($fsacars_config)); Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted October 18, 2009 Administrators Report Share Posted October 18, 2009 What's line 131 in mail.php? Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted October 18, 2009 Administrators Report Share Posted October 18, 2009 Aha, there's a space after that last ?> in mail.php Remove the ?> and it should work. That's why I never include the ?>, to prevent any output Quote Link to comment Share on other sites More sharing options...
Thomas Posted October 18, 2009 Author Report Share Posted October 18, 2009 Nabeel, your a genius!!! ;D Thankyou very much for your help sir! works fine! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.