stephanepa38 Posted November 20, 2009 Report Posted November 20, 2009 Hello We have an error with the pireps and FSACARS. When a pilot sent a pirep from FSACARS, he uses the SEND LOG button. After he clicked on this button, he has this message : Log sent ! After that, I receive an e-mail : A PIREP has been submitted by FSW004 FSW0004: TNCM to SOCA Aircraft: 3, Flight Time: 2.15 File using: fsacars All seems to be ok, but I don't have the pirep in phpVMS. No pirep in the database, no pirep in the admin panel, no pirep in all the system ! I just have the e-mail, but I don't have the pirep. I am currently using the last version of phpVMS : 2.0.796 What can I do to solve this error ? Thanks Stéphane Quote
TAV1702 Posted November 20, 2009 Report Posted November 20, 2009 It is confirmed then. I JUST posted bug report # 48 on this very same topic. I had the same thing happen to me just now after updating. Quote
Administrators Nabeel Posted November 20, 2009 Administrators Report Posted November 20, 2009 Sorry!! It is fixed now. The build should have failed when that PIREP file test didn't pass. Found a bug in my build system = Quote
TAV1702 Posted November 21, 2009 Report Posted November 21, 2009 Worked like a charm. Thanks Nabeel Quote
stephanepa38 Posted November 21, 2009 Author Report Posted November 21, 2009 Yes it works well ! Thanks ! Stéphane Quote
Thomas Posted November 21, 2009 Report Posted November 21, 2009 Still didnt work for me, Database error, this started just after 795 was run, Now ive updated and it still doesnt work plus i am getting more Access Denied errors. Quote
Administrators Nabeel Posted November 21, 2009 Administrators Report Posted November 21, 2009 Database error means FSACARS is backed up, so there's a PIREP there waiting for export. The permissions, you can fix, just set those to 777 Quote
Thomas Posted November 21, 2009 Report Posted November 21, 2009 Ok Nabeel i will do the permissions now, so how exactly do i fix this FS Acars/ FS Pax error? Quote
Thomas Posted November 21, 2009 Report Posted November 21, 2009 Ok Nabeel, but its not allowing us to export us to the database, Pic 1, saying connection ok: Pic 2, saying it failed to connect: Does that make any sense to you because its got me and also the rest of the VA Confused lol In the log.txt: SELECT a.name AS aircraft, COUNT(p.aircraft) AS count, SUM(p.flighttime) AS hours, FROM phpvms_pireps p, phpvms_aircraft a WHERE p.aircraft = a.id AND pilotid=12 GROUP BY a.name You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM phpvms_pireps p, phpvms_aircraft a WHERE p.aircraft = a.id AND pilotid' at line 2 Quote
Administrators Nabeel Posted November 21, 2009 Administrators Report Posted November 21, 2009 That's a separate error. I'm installing FSPAX to test. Can you post your config file for fspax? Quote
Thomas Posted November 21, 2009 Report Posted November 21, 2009 But how couldnt this work, it was downloaded AFTER the latest update beta? Link: http://pulseair.co.uk/PLS_config.cfg Contains: menu_name=Pulse Air :: Welcome To Our Website!; base_url=http://members.pulseair.co.uk; path_stats=index.php/acars; path_export=action.php/acars/fspax; username=PLS0001; password=none; Thomas. Quote
Administrators Nabeel Posted November 21, 2009 Administrators Report Posted November 21, 2009 I was able to export a PIREP using FSPAX, hmm. Try reinstalling it maybe? Quote
Thomas Posted November 21, 2009 Report Posted November 21, 2009 Ok Nabeel, well your flight isnt showing in the admin panel, only the one's filed manually are, and also re-installing FSpax didnt solve anybodys problem. Quote
PLS001 Posted November 21, 2009 Report Posted November 21, 2009 Nabeel, We as a VA are filling approx 20 pireps a day and we are all having the same issue, since the last couple of updates. when you exported the file did you export to ours or your own ? Thanks in advance Simon Quote
Administrators Nabeel Posted November 21, 2009 Administrators Report Posted November 21, 2009 To my own. I'm wondering what might have changed. Let me try something. I'll have an update tonight. There are no errors in the logs though? Weird Quote
Administrators Nabeel Posted November 21, 2009 Administrators Report Posted November 21, 2009 Can you guys try this: Open /core/modules/acars/fspax.php After line 171, add: 'landingrate'=>$_POST['TouchDownVertSpeedFt'], So it's: 'flighttime'=>$flighttime, 'landingrate'=>$_POST['TouchDownVertSpeedFt'], 'submitdate'=>'NOW()', Quote
Thomas Posted November 21, 2009 Report Posted November 21, 2009 Ok first of all nabeel, my fspax file looks completely different from that, Line 170: 'aircraft'=>$aircraft, Line 171: 'flighttime'=>$flighttime, Line 172: 'submitdate'=>'NOW()', Shall i still add that line? Quote
Thomas Posted November 21, 2009 Report Posted November 21, 2009 Plus Nabeel its not just FS Pax, its ACARS Aswell. Quote
Thomas Posted November 21, 2009 Report Posted November 21, 2009 This is the full config fspax.php... <?php /** * phpVMS - Virtual Airline Administration Software * Copyright (c) 2008 Nabeel Shahzad * For more information, visit www.phpvms.net * Forums: http://www.phpvms.net/forum * Documentation: http://www.phpvms.net/docs * * phpVMS is licenced under the following license: * Creative Commons Attribution Non-commercial Share Alike (by-nc-sa) * View license.txt in the root, or visit http://creativecommons.org/licenses/by-nc-sa/3.0/ * * @author Nabeel Shahzad * @copyright Copyright (c) 2008, Nabeel Shahzad * @link http://www.phpvms.net * @license http://creativecommons.org/licenses/by-nc-sa/3.0/ */ /* FSPassengers, Copyright © Daniel Polli http://www.fspassengers.com */ writedebug("FSPAX DEBUG"); //writedebug($_SERVER['QUERY_STRING']); writedebug(print_r($_POST, true)); # Check for connection if($_POST['FsPAskConnexion'] == 'yes') { # Validate pilot: $_POST['UserName'] = DB::escape($_POST['UserName']); # Entered as ### if(is_numeric($_POST['UserName'])) { $pilotid = intval(intval(trim( $_POST['UserName']))) - Config::Get('PILOTID_OFFSET'); } else { # Check if they entered as XXX### if(preg_match('/^([A-Za-z]*)(.*)(d*)/', $_POST['UserName'], $matches)>0) { $pilotid = intval(intval(trim($matches[2]))) - Config::Get('PILOTID_OFFSET'); } else { # Invalid Pilot echo '#Answer# Error - Invalid pilot ID format;'; return; } } $pilotdata = PilotData::GetPilotData($pilotid); if(!$pilotdata) { echo '#Answer# Error - Username don't exist or wrong password;'; return; } # Give it what it wants # Derive the config from the main config settings echo "#Answer# Ok - connected;"; echo 'Weight='.Config::Get('WeightUnit').' Dist='.Config::Get('DistanceUnit').' Speed='.Config::Get('SpeedUnit').' Alt='.Config::Get('AltUnit').' Liqu='.Config::Get('LiquidUnit'); echo '#welcome#'.Config::Get('WelcomeMessage').'#endwelcome#'; } if($_POST['FsPAskToRegister'] == 'yes') { $comment = ''; # Get the pilot id: if(is_numeric($_POST['UserName'])) { $pilotid = intval(intval(trim( $_POST['UserName']))) - Config::Get('PILOTID_OFFSET'); } else { if(preg_match('/^([A-Za-z]*)(d*)/', $_POST['UserName'], $matches) == 0) { echo "#Answer# Error: Pilot doesn't exist ;"; return; } $pilotid = intval(intval(trim($matches[2]))) - Config::Get('PILOTID_OFFSET'); } # Get the flight ID $flightinfo = SchedulesData::getProperFlightNum($_POST['FlightId']); $code = $flightinfo['code']; $flightnum = $flightinfo['flightnum']; /*if(preg_match('/^([A-Za-z]*)(d*)/', $_POST['FlightId'], $matches) == 0) { echo "#Answer# Error - Invalid flight ID;"; return; }*/ preg_match('/^([A-Za-z]*) - .*/', $_POST['DepartureIcaoName'], $aptinfo); $depicao = $aptinfo[1]; # Make sure it exists if(!OperationsData::GetAirportInfo($depicao)) { OperationsData::RetrieveAirportInfo($depicao); } preg_match('/^([A-Za-z]*) - .*/', $_POST['ArrivalIcaoName'], $aptinfo); $arricao = $aptinfo[1]; # Make sure it exists if(!OperationsData::GetAirportInfo($arricao)) { OperationsData::RetrieveAirportInfo($arricao); } //if($code == '') //{ # Find a flight using just the flight code $sched = SchedulesData::FindFlight($matches[2]); # Can't do it. They completely screwed this up if(!$sched) { return; } $code = $sched->code; $flightnum = $sched->flightnum; $leg = $sched->leg; $aircraft = $sched->aircraft; /*$depicao = $sched->depicao; $arricao = $sched->arricao;*/ if($depicao != $sched->depicao || $arricao != $sched->arricao) { $comment = 'phpVMS Message: Arrival or Departure does not match schedule. '; } //} # Get the time, don't care about seconds preg_match('/^(d*):(d*):(d*)/', $_POST['TotalBlockTime'], $time); $flighttime = $time[1].'.'.$time[2]; # Get the fuel used $fuelused = floatval($_POST['StartFuelQuantity']) - floatval($_POST['EndFuelQuantity']); # Form the log: $log = ''; foreach($_POST as $name=>$value) { if($name == 'FsPAskToRegister' || $name == 'UserName' || $name == 'Password') { continue; } $log .= "$name=$value<br />".PHP_EOL; } $comment .= 'FSPassengers Flight. No aircraft entered'; $data = array( 'pilotid'=>$pilotid, 'code'=>$code, 'flightnum'=>$flightnum, 'leg'=>$leg, 'depicao'=>$depicao, 'arricao'=>$arricao, 'aircraft'=>$aircraft, 'flighttime'=>$flighttime, 'submitdate'=>'NOW()', 'load'=>$_POST['NbrPassengers'], 'fuelused'=>$fuelused, 'source'=>'fspax', 'comment'=>$comment, 'log'=> $log); writedebug($data); $ret = ACARSData::FilePIREP($pilotid, $data); echo "#Answer# Ok - Saved;"; } Quote
Administrators Nabeel Posted November 21, 2009 Administrators Report Posted November 21, 2009 Yeah, add it after line 171, so then it will look like that 2nd bit I posted. On all ACARS? What version are you using? I'm flying on FSFK right now, and it seems to be working (they all use one interface) Quote
Administrators Nabeel Posted November 21, 2009 Administrators Report Posted November 21, 2009 Also, make sure the acars.txt is also writeable. Any errors which come up will screw up acars Quote
Thomas Posted November 21, 2009 Report Posted November 21, 2009 Addded the line, still no luck, still same error however new things in the core/logs/log.txt file: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM phpvms_pireps p, phpvms_aircraft a WHERE p.aircraft = a.id AND pilotid' at line 2 SELECT a.name AS aircraft, COUNT(p.aircraft) AS count, SUM(p.flighttime) AS hours, FROM phpvms_pireps p, phpvms_aircraft a WHERE p.aircraft = a.id AND pilotid=12 GROUP BY a.name You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM phpvms_pireps p, phpvms_aircraft a WHERE p.aircraft = a.id AND pilotid' at line 2 Quote
Administrators Nabeel Posted November 21, 2009 Administrators Report Posted November 21, 2009 Nothing in ACARS? I fixed that error. Let me trying doing a commit which fixed that, let's see if it helped. Which update did it start with? Do you remember? Did you run the update.php, I added a column to the PIREP table, do you have a landingstats column there? Quote
Administrators Nabeel Posted November 21, 2009 Administrators Report Posted November 21, 2009 Commit is up right now, give it a shot. Also, there's nothing in the acars.txt? What about in the modules/acars/log.txt (in case it wrote in there, it shouldn't have, but maybe it did?) Quote
Moderators joeri Posted November 21, 2009 Moderators Report Posted November 21, 2009 Yeah, add it after line 171, so then it will look like that 2nd bit I posted. On all ACARS? What version are you using? I'm flying on FSFK right now, and it seems to be working (they all use one interface) i want it gimegimegime ;D ;D ;D ;D Quote
Thomas Posted November 21, 2009 Report Posted November 21, 2009 It started with Version 2.0.795 I updated it with the update.php and also then did a update.php?force Which was successfull, then this problem, http://members.pulseair.co.uk/core/modules/ACARS/log.txt -- You can check the log here mate. We have just attempted to file a pirep, same error. Quote
Thomas Posted November 21, 2009 Report Posted November 21, 2009 And when you say you added a coloumn to the PIREP Table, where do you mean? In the SQL DB or in an actual FIELD? Quote
Administrators Nabeel Posted November 21, 2009 Administrators Report Posted November 21, 2009 In the SQL DB, in the PIREPs table, is there a "landingrate" column? Let me see what changed in 795 Quote
Thomas Posted November 21, 2009 Report Posted November 21, 2009 Yes theres landingrate, could i remove it and see if it works? Also, our providers doesnt use localhost, would that maybe cause a problem? We use: 10.21.47.198 Thomas. Quote
Administrators Nabeel Posted November 21, 2009 Administrators Report Posted November 21, 2009 That's supposed to be there, I thought that not being there was the source of the problem, but since it's there, that's fine. Don't use localhost for what? Empty the modules log.txt as well, and then try filling. This is a weird error. Does xacars work, ACARS wise and PIREP wise? Quote
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.