I have been getting a lot of reports with kACARS getting the "switch=pirep" error. Even though the PIREP is actually being submitted. I have traced this down to the current condition of VACentral. VACentral has been very unstable for the past few months. And it will hang your own site when your site is attempting to send data to VACentral. This can happen even if the setting for VACentral is set to false in the site configuration file. The only remedy is to manually disconnect from VACentral. The following steps are necessary to do this.
Manually stop PIREP from automatically being sent to VACentral
- Open the core/common/PIREPData.class.php file.
- Scroll down to the "fileReport" function.
- Comment out the following line "CentralData::send_pirep($pirepid);"
- Save file and upload to your site. This will stop the automated sending of the PIREP during submission. This is the biggest hangup. When the PIREP is sent the site waits for a confirmation from VACentral before the code moves on. Since VACentral is unstable this can timeout or just take a very long time. In the mean time kACARS will time out waiting for a response from your site. You would then get the "switch = pirep" error.
- You can still manually send the PIREPs from the Admin side of your site. Or you can setup a cron job to automatically send them each day.
Manually stop position reports from being sent to VAcentral
- Open the core/common/ACARSData.class.php file.
- Scroll down to the "updateFlightData" function.
- Comment out the following line "$res = CentralData::send_acars_data($data);"
- Save the file and upload to your site. This will stop the automated sending of the position report to VACentral. This can cause problems in kACARS also. The same thing can happen as above. Your site sends the position data and then waits for confirmation. While waiting kACARS may timeout or become unresponsive for a few seconds.