Jump to content

[SOLVED] fsacars and database error


maxwaldorf

Recommended Posts

Hi again,

As written in the fsacars notice, the error message might show up (which did in my case) but PIREP is sent to system...

The only issue with that is :

Fsacars thinks the flight log is still not sent and so, at next flight it will send again and again the previous flight...

Is this because fsacars does not receive a "OK" from the website ?

I am willing to help you on that subject to identify the bug...

Thanks for the help !

;D

Link to comment
Share on other sites

  • Administrators

It does see the OK message (I'm assuming), I send out an OK either way. I don't always get the error. I can't really ask the FSACARS people either about it, since they seemingly closed shop.

It usually shows up when you click "Send Log", but when you accept the PIREP, it should send the PIREP right then. I haven't had the time to really diagnose it in too much detail.

Link to comment
Share on other sites

I also notice when they get sent in with fsacars on the website under the pilots page if you click on a pilot it doesn't show a prep at the bottom as if you were to fill one out on the website. I didn't know if this is in the matter of being fixed but i just thought i would let you know.

Link to comment
Share on other sites

  • Administrators

I also notice when they get sent in with fsacars on the website under the pilots page if you click on a pilot it doesn't show a prep at the bottom as if you were to fill one out on the website. I didn't know if this is in the matter of being fixed but i just thought i would let you know.

Do you see it in the admin panel, under that pilot?

Link to comment
Share on other sites

  • Administrators

You can post your log file from the engine, just in app.config.php, set ACARS_DEBUG to true (if the entry is in your local.config, set it there), then just attach the /core/modules/acars/log.txt file in a post here, and I'll take a look

Link to comment
Share on other sites


Well the log shows up that :

pilot=XLRXLR0003&date=2009/01/04&time=23:22:00&callsign=®=F-TACB&origin=LFLL&dest=LFLY&alt=&equipment=A321&fuel=00&duration=00:01&distance=00&version=4015&more=0&log=[2009/01/04%2023:22:00]*Flight%20IATA:XLR1*Pilot%20Number:XLR0003*Company%20ICAO:XLR*Aircraft%20Type:A321*Aircraft%20Registration:F-TACB*Departing%20Airport:%20LFLL*Destination%20Airport:%20LFLY*Online:%20No*Route:DCT*Flight%20Level:050*23:22%20%20Zero%20fuel%20Weight:%20542%20Lbs,%20Fuel%20Weight:%2057%20Lbs*23:22%20%20Parking%20Brakes%20off*23:22%20%20Com1%20Freq=128.30*23:22%20%20VR=%20047%20Knots*23:22%20%20V2=%20045%20Knots*23:22%20%20Take-off*23:22%20%20Take%20off%20Weight:%20599%20Lbs*23:22%20%20Wind:%20000?%20@%20000%20Knots%20Heading:%20026?*23:22%20%20POS%20N45?%2043?%2012??%20E005?%2004?%2045??%20*23:22%20%20N11%2073%20N12%2000*23:22%20%20TOC*23:22%20%20Fuel%20Weight:%2059%20Lb*23:23%20%20Land*23:23%20%20Wind:000?@000%20Knots*23:23%20%20Heading:%20357?*23:23%20%20Flight%20Duration:%2000:01%20*23:23%20%20Landing%20Weight:%20599%20Lbs*23:23%20%20POS%20N45?%2043?%2050??%20E005?%2004?%2055??%20*23:23%20%20Parking%20brakes%20on*23:23%20%20Block%20to%20Block%20Duration:%2000:01%20*23:23%20%20Final%20Fuel:%2057%20Lbls*23:23%20%20Spent%20Fuel:%2000%20Lbls*23:23%20%20Flight%20Length:%2000%20NM*23:23%20%20TOD%20Land%20Length:%2000%20NM*

PIREP FILE
Array
(
    [pilot] => XLRXLR0003
    [date] => 2009/01/04
    [time] => 23:22:00
    [callsign] => 
    [reg] => F-TACB
    [origin] => LFLL
    [dest] => LFLY
    [alt] => 
    [equipment] => A321
    [fuel] => 00
    [duration] => 00:01
    [distance] => 00
    [version] => 4015
    [more] => 0
    [log] => [2009/01/04 23:22:00]*Flight IATA:XLR1*Pilot Number:XLR0003*Company ICAO:XLR*Aircraft Type:A321*Aircraft Registration:F-TACB*Departing Airport: LFLL*Destination Airport: LFLY*Online: No*Route:DCT*Flight Level:050*23:22  Zero fuel Weight: 542 Lbs, Fuel Weight: 57 Lbs*23:22  Parking Brakes off*23:22  Com1 Freq=128.30*23:22  VR= 047 Knots*23:22  V2= 045 Knots*23:22  Take-off*23:22  Take off Weight: 599 Lbs*23:22  Wind: 000? @ 000 Knots Heading: 026?*23:22  POS N45? 43? 12?? E005? 04? 45?? *23:22  N11 73 N12 00*23:22  TOC*23:22  Fuel Weight: 59 Lb*23:23  Land*23:23  Wind:000?@000 Knots*23:23  Heading: 357?*23:23  Flight Duration: 00:01 *23:23  Landing Weight: 599 Lbs*23:23  POS N45? 43? 50?? E005? 04? 55?? *23:23  Parking brakes on*23:23  Block to Block Duration: 00:01 *23:23  Final Fuel: 57 Lbls*23:23  Spent Fuel: 00 Lbls*23:23  Flight Length: 00 NM*23:23  TOD Land Length: 00 NM*
    [module] => ACARS
    

 => fsacars
    [id] => pirep
    [redir] => pirep
    [icao] => 
    [pilotid] => pirep
    [action] => pirep
    [request] => fsacars
)

Array

The problem seems to be coming from fsacars soft itself as the log received something...

But is there a way to enable a debug mode for this software (the fact that I am under vista will not help either...)

Cheers !

Link to comment
Share on other sites

  • Administrators

Your PilotID is doubling - in youre config file, set CompanyICAO to blank (CompanyICAO=)

As for debug mode, I haven't found a way. I use that log to debug as well.

What you can do is, the top line:

pilot=XLRXLR0003&date=2009/01/04&time=23:22:00&callsign=&reg=F-TACB&origin=LFLL...

Put it in your URL as:

yoursite.com/action.php/acars/fsacars/pirep/?pilot=XLRXLR0003&date=2009/01/04&time=23:22:00&callsign=&reg=F-TACB&origin=LFLL...

And you can see the system response (should be "OK")

Link to comment
Share on other sites

The fsacars INI template build the pilot name like that and if I remove the XLR before the numbers, the google maps does not recognize the pilot !

Ok I checked, As you said, response is OK with all the array stuff...

Anyway, I looked into the original send_pirep.php provided by fsacars team...

As I am a total dumb at coding, is there a difference between :

RETURN "OK"

(in Original fsacars file)

and

echo "OK"

(in phpvms files)

Cheers !

Link to comment
Share on other sites

OK,

I found out what was messing with FSACARS !!!

It seems that you added an output in your log with the result ARRAY... (apache server seems to output this as a single line which might contribute to the error also)

Here is the server result on submit : (one long single line)

Array ( [pilotid] => 0003 [code] => XLR [flightnum] => 1 [leg] => [depicao] => LFLL [arricao] => LFLY [aircraft] => 1 [flighttime] => 00.01 [submitdate] => NOW() [comment] => [log] => [2009/01/04 23:22:00]*Flight IATA:XLR1*Pilot Number:XLR0003*Company ICAO:XLR*Aircraft Type:A321*Aircraft Registration:F-TACB*Departing Airport: LFLL*Destination Airport: LFLY*Online: No*Route:DCT*Flight Level:050*23:22 Zero fuel Weight: 542 Lbs, Fuel Weight: 57 Lbs*23:22 Parking Brakes off*23:22 Com1 Freq=128.30*23:22 VR= 047 Knots*23:22 V2= 045 Knots*23:22 Take-off*23:22 Take off Weight: 599 Lbs*23:22 Wind: 000? @ 000 Knots Heading: 026?*23:22 POS N45? 43? 12?? E005? 04? 45?? *23:22 N11 73 N12 00*23:22 TOC*23:22 Fuel Weight: 59 Lb*23:23 Land*23:23 Wind:000?@000 Knots*23:23 Heading: 357?*23:23 Flight Duration: 00:01 *23:23 Landing Weight: 599 Lbs*23:23 POS N45? 43? 50?? E005? 04? 55?? *23:23 Parking brakes on*23:23 Block to Block Duration: 00:01 *23:23 Final Fuel: 57 Lbls*23:23 Spent Fuel: 00 Lbls*23:23 Flight Length: 00 NM*23:23 TOD Land Length: 00 NM* ) OK

fsacars software seems to be reluctant to that piece of information by simply removing (or commenting) the following line, the issue wanished !

Here the "work around" in fscars.php in /core/modules/ACARS/ :

Just search and comment it out or remove it :

print_r($data);

(you can find it at the end of the file)

I've been working hours to understand why this was not working and finally !

I will continue testing it and give you feedback...

Cheers !

:D[/code]

Link to comment
Share on other sites

  • Administrators

Doh!

writedebug($data);
print_r($data);

Didn't remove the print_r()... heh. I changed that on my side so it'll be corrected... Thanks! I end up leaving something, funny thing is, the writedebug() was so I didn't have to do print_r(). Sorry about that...

Also, don't remove the XLR before the numbers in the pilot ID, just remove it from the CompanyICAO. It's the way I need the complete ID and code of the pilot, while I can change that going forward, it'll take a few places to change it so it accepts both (I've changed other code so now I can take only the ID number).

Link to comment
Share on other sites

Also, don't remove the XLR before the numbers in the pilot ID, just remove it from the CompanyICAO. It's the way I need the complete ID and code of the pilot, while I can change that going forward, it'll take a few places to change it so it accepts both (I've changed other code so now I can take only the ID number).

Glad to have helped !

But concerning the CompanyICAO, are saying I should remove it from the INI ?

In that case, the INI would become invalid !

(To be honest, I didn't catch that point... You can still PM or email me if you want to push things forward)

Cheers !

Link to comment
Share on other sites

Well, redownload the ini file from your site and compare, the CompanyICAO will be blanked out, don't remove it but set it blank so the line reads:

CompanyICAO=

And for your pilot ID, include the airline numbers

Heh... I wouldn't do that if I where you... As fsacars will not work correctly !

:(

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...