Airmail Error when Sending NOTAM

Hi,

a pilot of our va reported me an error when sending a notam, it seems that the airmal was sent probably. Thanks for help

Fatal error : Uncaught exception ‘Exception’ with message ‘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 ‘s message inbox on 09/22/2014’, ‘25’, ‘1411389143’)’ at line 2’ in /var/www/web1112/html/va/core/common/MailData.class.php:92 Stack trace: #0 /var/www/web1112/html/va/core/modules/Mail/Mail.php(138): MailData::send_new_mail(‘33’, ‘16’, ‘Vorschlag eines…’, ‘You received a …’, 25, 1411389143) #1 /var/www/web1112/html/va/core/modules/Mail/Mail.php(38): Mail->send() #2 [internal function]: Mail->index() #3 /var/www/web1112/html/va/core/classes/MainController.class.php(218): call_user_func_array(Array, Array) #4 /var/www/web1112/html/va/index.php(60): MainController::RunAllActions() #5 {main} thrown in /var/www/web1112/html/va/core/common/MailData.class.php on line 92

It is an error that is encountered when you have pilot names that have a apostrophe in them. It breaks the sql syntax. If you are using the latest version of airmail from my GitHub account it should be escaping it. If it is not you will have to escape the name field prior to it going in the database.

I’ll check it, thank you

Hello!

I have installed right now the fabulous AIRMail 4 and i have the same problem of CedGauche.

Regards, Luka.

Hello!

I have installed right now the fabulous AIRMail 4 and i have the same problem of CedGauche.

Regards, Luka.

Do you have names with apostrophes in them?

Out of the blue this error is there again.

I’ve checked all pilot names, there are no apostrophe in them.

I’ve checked that the script stops at a pilot with the id 22, after this pilot the notam script stops working. The pilot with the id 22 and 23 have no apostrophe or german typo like ä,ö etc in them.

Error:

Fatal error : Uncaught exception ‘Exception’ with message ‘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 ‘s message inbox on 04/01/2015’, ‘11’, ‘1427875628’)’ at line 2’ in /var/www/web1112/html/va/core/common/MailData.class.php:92 Stack trace: #0 /var/www/web1112/html/va/core/modules/Mail/Mail.php(138): MailData::send_new_mail(‘24’, ‘1’, ‘Monatsbericht M…’, ‘You received a …’, 11, 1427875628) #1 /var/www/web1112/html/va/core/modules/Mail/Mail.php(38): Mail->send() #2 [internal function]: Mail->index() #3 /var/www/web1112/html/va/core/classes/MainController.class.php(218): call_user_func_array(Array, Array) #4 /var/www/web1112/html/va/index.php(60): MainController::RunAllActions() #5 {main} thrown in /var/www/web1112/html/va/core/common/MailData.class.php on line 92

SimPilot will know better but did your hosting environment change? Host update php or something?

No nothing changed there

Again we have this problem, I don’t know what to do:

Fatal error : Uncaught exception ‘Exception’ with message ‘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 ‘s message inbox on 09/01/2015’, ‘23’, ‘1441093324’)’ at line 2’ in /var/www/web1112/html/va/core/common/MailData.class.php:92 Stack trace: #0 /var/www/web1112/html/va/core/modules/Mail/Mail.php(138): MailData::send_new_mail(‘94’, ‘1’, ‘Monatsbericht A…’, ‘You received a …’, 23, 1441093324) #1 /var/www/web1112/html/va/core/modules/Mail/Mail.php(38): Mail->send() #2 [internal function]: Mail->index() #3 /var/www/web1112/html/va/core/classes/MainController.class.php(218): call_user_func_array(Array, Array) #4 /var/www/web1112/html/va/index.php(60): MainController::RunAllActions() #5 {main} thrown in /var/www/web1112/html/va/core/common/MailData.class.php on line 92

I had a looked at it but when I sent a Notam it only sent 1. to me as I am pilot nr. 1

I am getting a blanc page as soon as I am sending the notam.

Any ideas,

Regards,

Cor

Again we have this problem, I don’t know what to do:

Something must be changing in the hosting environment if this issue is transient as it seems.

I solved the problem. Deleted first airmail and installed it again and Notam works.

On 23/11/2014 at 3:49 PM, simpilot said:

Do you have names with apostrophes in them?

Hello dear David! 

I don’t have pilots names with  apostrophes. I think the problem coming from the SQL table, i try to recreate now.

Sorry for my late, i had some problems with the forum here.

Happy new year!

9 minutes ago, Luka.Niko said:

Hello dear David! 

I don’t have pilots names with  apostrophes. I think the problem coming from the SQL table, i try to recreate now.

Sorry for my late, i had some problems with the forum here.

Happy new year!

Ok, this is work for me. HAPPY NEW YEAR TO ALL !