cfitz619 Posted January 19, 2021 Report Posted January 19, 2021 phpvms 5.5.2.72 PHP: 7.2 Skin: blue ice v2 P7 mysql 5.6, md 10.2 Can someone help me please? I have been trying to figure out why I can't add aircrafts. I get the error message "cannot add aircraft". How do I turn on error reporting? I have searched the forum but can't find what I am looking for. Thank You. Quote
Administrators ProAvia Posted January 20, 2021 Administrators Report Posted January 20, 2021 Does it work if you are on the default crystal skin? You can't be on MySQL 5.6 and MariaDB 10.2 at the same time. Which is it? Google is your friend... search there for how to turn on error reporting in PHP. Quote
cfitz619 Posted January 20, 2021 Author Report Posted January 20, 2021 I tried going to the crystal skin. It did not work their either. I will figure it out. Thank You. Quote
cfitz619 Posted January 20, 2021 Author Report Posted January 20, 2021 After figuring out how to turn on error reporting, I tried installing an aircraft and got the error: " cannot add aircraft". I checked the error log, and here is the message: Time: 01.20.21 14:29:04 Backtrace: DB::write_debug > DB::query > OperationsData::addAircraft > Operations->add_aircraft_post > Operations->aircraft > MainController::RunAllActions Query: INSERT INTO phpvms_aircraft (`icao`, `name`, `fullname`, `registration`, `downloadlink`, `imagelink`, `range`, `weight`, `cruise`, `maxpax`, `maxcargo`, `airline`, `minrank`, `enabled`, `ranklevel`) VALUES ('B737', '737-700', 'boeing 737-700', 'N131MC', '', '', '3060', '154500', '41000', '140', '30000', '', '2', '1', '1') Error: (1054) - Unknown column 'airline' in 'field list' Quote
Administrators ProAvia Posted January 20, 2021 Administrators Report Posted January 20, 2021 You indicated you are on MariaDB 10.2 - check with your host and ask them to turn Strict Mode OFF. You might also try adding an aircraft again - but be sure each and every entry has something in it - even if that something is a space character. Quote
cfitz619 Posted January 20, 2021 Author Report Posted January 20, 2021 Here is the response from my hosting company, Hostinger: Thank you for your patience! I would like to kindly note that your hosting has 5.6 version already, and MySQL type is MariaDB 10.2 version I will request that they turn off strict mode. Thanks for your help ProAvia. It is greatly appreciated. Quote
Administrators ProAvia Posted January 20, 2021 Administrators Report Posted January 20, 2021 Chances are Hostinger will not turn Strict Mode OFF. Did you attempt to place data in each and every field of the add aircraft form? Quote
cfitz619 Posted January 20, 2021 Author Report Posted January 20, 2021 You are correct, they said they will not turn it off. Yes, I tried to fill in every field. Now I am unsure how to proceed. I will do more research. Thank You. Quote
Administrators ProAvia Posted January 20, 2021 Administrators Report Posted January 20, 2021 If you want - PM me admin login details and will have a quick look. Quote
cfitz619 Posted January 20, 2021 Author Report Posted January 20, 2021 I just reinstalled phpvms, and everything was working flawlessly. Then after about 20 minutes of adding airports, flights, and scedules I decided to upload Airport Lookup and now I can't add or edit my current fleet. I am getting this error again: Backtrace: DB::write_debug > DB::query > OperationsData::addAircraft > Operations->add_aircraft_post > Operations->aircraft > MainController::RunAllActions Query: INSERT INTO phpvms_aircraft (`icao`, `name`, `fullname`, `registration`, `downloadlink`, `imagelink`, `range`, `weight`, `cruise`, `maxpax`, `maxcargo`, `airline`, `minrank`, `enabled`, `ranklevel`) VALUES ('B737', '737-700', 'boeing 737-700', 'N131MC', '', '', '3060', '154500', '41000', '140', '30000', '', '2', '1', '1') Error: (1054) - Unknown column 'airline' in 'field list' Quote
Administrators ProAvia Posted January 20, 2021 Administrators Report Posted January 20, 2021 Look at the database table for aircraft - is there an 'airline' column? Actually, list all the columns in the aircraft table here for us. I see that 'downloadlink', 'imagelink' and 'airline' fields are blank. Insert even a single character in them. Use the letter 'A' in each of those blank fields and let us know what happens. Quote
cfitz619 Posted January 21, 2021 Author Report Posted January 21, 2021 Adden an "a" in each blank fields. No change. Here is the error log and the aircraft sql: Quote
cfitz619 Posted January 21, 2021 Author Report Posted January 21, 2021 I added that aircraft in the sql before uploading the airport lookup. Quote
Administrators ProAvia Posted January 21, 2021 Administrators Report Posted January 21, 2021 APlookup shouldn't affect the aircraft. In looking at your table, you are missing the 'airline' field between 'maxcargo' and 'minrank'. Once you figure out how to add the 'airline' column in the correct position the add aircraft should work. I think the 'airline' column is supposed to be added with a specific module you are using (maybe a schedule search module?). What modules have you installed? As you can see in the error - there is no 'airline' entry available in the aircraft table. Notice the '' after '42505', ..... the '' is the missing airline , but you can't add it via add aircraft in the admin panel because it isn't there to be added. Again, guessing a module you added wasn't completely installed. Quote
cfitz619 Posted January 21, 2021 Author Report Posted January 21, 2021 The only module I have is airport lookup. I have nothing else installed. No skins or anything. Fresh install of phpvms 5.5.2.72 & airport lookup. Here is the link: https://forum.phpvms.net/topic/27452-airport-lookup-updated-vacentral-api-for-airport-lookup-only/ Quote
Administrators ProAvia Posted January 21, 2021 Administrators Report Posted January 21, 2021 There is nothing in my phpVMS 5.5.2.72 or my APlookup files that you downloaded that have an 'airline' column in the aircraft table or the aircraft form. Are you adding aircraft manually or importing an aircraft file? Did you do any file edits exfept the APlookup mod? Quote
cfitz619 Posted January 21, 2021 Author Report Posted January 21, 2021 I know there is nothing in your airport lookup that would cause the error. I was not implying that. I am trying to add the aircraft manually. It is just wierd that after I installed airport lookup, I can no longer add aircraft. It's a coincidence. I installed 3 aircrafts before installing airport lookup. The error states that it is an unknown column "airline" in field list. I do not see that in my sql Quote
Administrators ProAvia Posted January 21, 2021 Administrators Report Posted January 21, 2021 You aren't seeing in in the aircraft table cause it isn't present there. Something somewhere "thinks" it's supposed to be there - hence the error. I can't see where 'airline' is in the add aircraft code. I've checked the data class , module and templates. Have you edited: /core/common/OperationsData.class.php /admin/modules/Operations/Operations.php /admin/templates/ops_aircraftform.php ???? I think that is all the files that include the add aircraft code. Send me admin credentials so I can log into you phpvms admin panel Quote
cfitz619 Posted January 21, 2021 Author Report Posted January 21, 2021 Cannot Edit Aircraft [SOLVED] Just wanted to let you know that I fixed this error by exporting the aircraft sql to my pc and edited with notepad++. The error message was Error: (1054) - Unknown column 'airline' in 'field list' so I just added 'airline' in the sql. I went back into phpvms admin and added a Citation X and everything went flawlessly. The steps I took to fix the issue: The Error: Backtrace: DB::write_debug > DB::query > OperationsData::addAircraft > Operations->add_aircraft_post > Operations->aircraft > MainController::RunAllActions Query: INSERT INTO phpvms_aircraft (`icao`, `name`, `fullname`, `registration`, `downloadlink`, `imagelink`, `range`, `weight`, `cruise`, `maxpax`, `maxcargo`, `airline`, `minrank`, `enabled`, `ranklevel`) VALUES ('B737', '737-700', 'boeing 737-700', 'N131MC', '', '', '3060', '154500', '41000', '140', '30000', '', '2', '1', '1') Error: (1054) - Unknown column 'airline' in 'field list' 1.) exported the aircraft sql to my pc 2.) added `airline` between max cargo and minrank using notepad++ 3.) Deleted aircraft sql from server. 4.) Imported edited copy of airport sql to server 5.) Went into phpvms admin and added Citation X to see if the edited sql fixed my issue. Added plane without problems. 6.) Issue resolved Hope this helps others who may have this issue in the future. Quote
Administrators ProAvia Posted January 21, 2021 Administrators Report Posted January 21, 2021 Great - thanks for reporting back what worked for you. There is no where I've found in the base installation that it's adding the 'airline' column in the aircraft table. I have checked with and without the APlookup code. 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.