# New: airport lookup server with extended data

**URL:** <https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264>\
**Category:** phpVMS Legacy Support (v2/v5)\
**Created:** [December 13, 2017, 7:55pm UTC](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264 "2017-12-13T19:55:46Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Longhaul444](https://forum.phpvms.net/user_avatar/forum.phpvms.net/longhaul444/32/455_2.png) [@Longhaul444](https://forum.phpvms.net/u/Longhaul444)\
**Post date:** [January 2, 2018, 1:39pm UTC](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264/21 "2018-01-02T13:39:36Z")

</div>

> 13 minutes ago, mischka said:
> 
> In my operations.php, around line 338, I have this:
> 
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$tmp = array(  
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;‘id’ =\> $row-\>id,  
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;‘cell’ =\> array(  
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;# Each column, in order  
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$row-\>icao,  
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$row-\>name,  
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$row-\>country,  
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$row-\>fuelprice,  
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$row-\>lat,  
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$row-\>lng,  
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$edit,  
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;),  
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;);
> 
> Have you added the new fields there?

AH, that might be the piece that’s missing. let me try and see what happens

---

<div class="post-metadata">

**Author:** ![Longhaul444](https://forum.phpvms.net/user_avatar/forum.phpvms.net/longhaul444/32/455_2.png) [@Longhaul444](https://forum.phpvms.net/u/Longhaul444)\
**Post date:** [January 2, 2018, 1:43pm UTC](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264/22 "2018-01-02T13:43:31Z")

</div>

&nbsp;

That worked! Now I just have to figure out why the IATA code isn’t going in. Thanks for the missing piece to the puzzle. And I haven’t tried the import function yet either, I’ll get back to ya in a bit.

---

<div class="post-metadata">

**Author:** ![mischka](https://forum.phpvms.net/user_avatar/forum.phpvms.net/mischka/32/203_2.png) [@mischka](https://forum.phpvms.net/u/mischka)\
**Post date:** [January 2, 2018, 2:11pm UTC](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264/23 "2018-01-02T14:11:25Z")

</div>

might be a case senstive problem&nbsp;(iata vs IATA)

by import you mean the automatic add of airports when importing schedules? That \*should\* work, cause afaik it uses the same mechanism. I haven’t tried it myself actually

---

<div class="post-metadata">

**Author:** ![Longhaul444](https://forum.phpvms.net/user_avatar/forum.phpvms.net/longhaul444/32/455_2.png) [@Longhaul444](https://forum.phpvms.net/u/Longhaul444)\
**Post date:** [January 2, 2018, 2:21pm UTC](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264/24 "2018-01-02T14:21:58Z")

</div>

> 3 minutes ago, mischka said:
> 
> might be a case senstive problem&nbsp;(iata vs IATA)
> 
> by import you mean the automatic add of airports when importing schedules? That \*should\* work, cause afaik it uses the same mechanism. I haven’t tried it myself actually

Yup that was exactly the case. My db had IATA and it was looking for iata. Working beautifully now, thanks for the help. Hopefully the schedules still work. And I changed the template form for the airports admin/lib/airport\_template.csv as well to show the extra colums:

icao,iata,name,hub,country,city,fuelprice,altitude,lat,lng,timezoneoffset,timezone,chartlink&nbsp;

---

<div class="post-metadata">

**Author:** ![Longhaul444](https://forum.phpvms.net/user_avatar/forum.phpvms.net/longhaul444/32/455_2.png) [@Longhaul444](https://forum.phpvms.net/u/Longhaul444)\
**Post date:** [January 2, 2018, 3:28pm UTC](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264/25 "2018-01-02T15:28:23Z")

</div>

Dunno if this will help David or not, but did you also change the&nbsp;VACENTRAL\_API\_SERVER to&nbsp;[https://virtualairlines.eu](https://virtualairlines.eu) as well? That might cause an issue if the vacentral url is still there.&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![OzFlyer](https://forum.phpvms.net/user_avatar/forum.phpvms.net/ozflyer/32/268_2.png) [@OzFlyer](https://forum.phpvms.net/u/OzFlyer)\
**Post date:** [January 2, 2018, 5:35pm UTC](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264/26 "2018-01-02T17:35:21Z")

</div>

> 4 hours ago, mischka said:
> 
> It’s strange… the 2nd line below doesn’t show the full url you are calling.&nbsp;
> 
> What is the actual url of your website? Can you send me your phpvms.js by PM?&nbsp;

Is this for me or Longhaul444?

If for me URL is:&nbsp;[http://msfairways.net](http://msfairways.net)

> Quote
> 
> VACENTRAL\_API\_SERVER to&nbsp;[https://virtualairlines.eu](https://virtualairlines.eu/)

I have check this and it has not been changed.

Should I copy this line over to the local.config.php file and edit it?

David.

Oz Flyer.

---

<div class="post-metadata">

**Author:** ![mischka](https://forum.phpvms.net/user_avatar/forum.phpvms.net/mischka/32/203_2.png) [@mischka](https://forum.phpvms.net/u/mischka)\
**Post date:** [January 3, 2018, 12:15pm UTC](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264/27 "2018-01-03T12:15:39Z")

</div>

> 18 hours ago, david said:
> 
> I have check this and it has not been changed.
> 
> Should I copy this line over to the local.config.php file and edit it?
> 
> David.
> 
> Oz Flyer.

Yes, you need to make the change or add it to&nbsp;your local.config.php otherwise you are just querying the old vacentral server

---

<div class="post-metadata">

**Author:** ![Longhaul444](https://forum.phpvms.net/user_avatar/forum.phpvms.net/longhaul444/32/455_2.png) [@Longhaul444](https://forum.phpvms.net/u/Longhaul444)\
**Post date:** [January 4, 2018, 6:47pm UTC](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264/28 "2018-01-04T18:47:30Z")

</div>

Sorry for my lateness, we got hammered by a snow storm nobody was expecting. Almost a foot of snow. Power just came back on. Ah I see mischka beat me to it.

---

<div class="post-metadata">

**Author:** ![OzFlyer](https://forum.phpvms.net/user_avatar/forum.phpvms.net/ozflyer/32/268_2.png) [@OzFlyer](https://forum.phpvms.net/u/OzFlyer)\
**Post date:** [January 7, 2018, 11:22pm UTC](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264/29 "2018-01-07T23:22:00Z")

</div>

Have added&nbsp;VACENTRAL\_API\_SERVER to&nbsp;[https://virtualairlines.eu](https://virtualairlines.eu/)&nbsp;to local.config file and ask site owner to restart phpvms.

Will report back when restart has been done.

Thanks so far for all the help.

---

<div class="post-metadata">

**Author:** ![OzFlyer](https://forum.phpvms.net/user_avatar/forum.phpvms.net/ozflyer/32/268_2.png) [@OzFlyer](https://forum.phpvms.net/u/OzFlyer)\
**Post date:** [January 8, 2018, 10:54pm UTC](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264/30 "2018-01-08T22:54:46Z")

</div>

Still not working.

Now today the add airport is no longer a popup window but a fresh&nbsp;page of is own and when you click look up you get a blank page with “Some fields were blank”&nbsp;

---

<div class="post-metadata">

**Author:** ![OzFlyer](https://forum.phpvms.net/user_avatar/forum.phpvms.net/ozflyer/32/268_2.png) [@OzFlyer](https://forum.phpvms.net/u/OzFlyer)\
**Post date:** [January 11, 2018, 11:43pm UTC](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264/31 "2018-01-11T23:43:22Z")

</div>

Fix the last post problem with “Add Airport”&nbsp;its now back to being in a popup window but still will not fetch any data.

---

<div class="post-metadata">

**Author:** ![ATACEO](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/a/858c86/32.png) [@ATACEO](https://forum.phpvms.net/u/ATACEO)\
**Post date:** [March 2, 2018, 10:33pm UTC](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264/32 "2018-03-02T22:33:54Z")

</div>

Hello all,

&nbsp;

I am new to this and am having an issue with the add new Airport and am trying to follow this thread.&nbsp; However in first post it says “1) Go to your local.config.php / app.config.php to&nbsp;change your phpvms\_api\_server”&nbsp; I have changed the app.config.php but I do not see anything related to phpvms\_api\_server in the local.config.php.&nbsp; That line is it supposed to be&nbsp; **added&nbsp;** to the local.config.php and if so where should it be added?

&nbsp;

Ok UPDATE:

&nbsp;

I have added the code to local.config.php and as OzFlyer said it is still not fetching any data when adding New Airport and ICAO code.&nbsp; Any help would be greatly appreciated.

&nbsp;

Thank you for your time and understanding

---

<div class="post-metadata">

**Author:** ![web541](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/w/59ef9b/32.png) [@web541](https://forum.phpvms.net/u/web541)\
**Post date:** [March 3, 2018, 9:12pm UTC](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264/33 "2018-03-03T21:12:05Z")

</div>

> 22 hours ago, ATACEO said:
> 
> Hello all,
> 
> &nbsp;
> 
> I am new to this and am having an issue with the add new Airport and am trying to follow this thread.&nbsp; However in first post it says “1) Go to your local.config.php / app.config.php to&nbsp;change your phpvms\_api\_server”&nbsp; I have changed the app.config.php but I do not see anything related to phpvms\_api\_server in the local.config.php.&nbsp; That line is it supposed to be&nbsp; **added&nbsp;** to the local.config.php and if so where should it be added?
> 
> &nbsp;
> 
> Ok UPDATE:
> 
> &nbsp;
> 
> I have added the code to local.config.php and as OzFlyer said it is still not fetching any data when adding New Airport and ICAO code.&nbsp; Any help would be greatly appreciated.
> 
> &nbsp;
> 
> Thank you for your time and understanding

The local.config.php doesn’t need to be changed too much, but rather a few other files.

Have you followed the tutorial here?&nbsp;[https://www.virtualairlines.eu/index.php/Blog](https://www.virtualairlines.eu/index.php/Blog)

---

<div class="post-metadata">

**Author:** ![ATACEO](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/a/858c86/32.png) [@ATACEO](https://forum.phpvms.net/u/ATACEO)\
**Post date:** [March 3, 2018, 11:39pm UTC](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264/34 "2018-03-03T23:39:26Z")

</div>

web541,

&nbsp;

Yes I have followed this to a “T”&nbsp; Have checked it and double checked it.&nbsp;&nbsp;

---

<div class="post-metadata">

**Author:** ![mischka](https://forum.phpvms.net/user_avatar/forum.phpvms.net/mischka/32/203_2.png) [@mischka](https://forum.phpvms.net/u/mischka)\
**Post date:** [March 4, 2018, 12:13pm UTC](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264/35 "2018-03-04T12:13:39Z")

</div>

> 12 hours ago, ATACEO said:
> 
> web541,
> 
> &nbsp;
> 
> Yes I have followed this to a “T”&nbsp; Have checked it and double checked it.&nbsp;&nbsp;

Can you please PM me with the name of your VA so I can check in the logs if you are actually reaching the server, and we can take it from there

---

<div class="post-metadata">

**Author:** ![Michael2015](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/m/41988e/32.png) [@Michael2015](https://forum.phpvms.net/u/Michael2015)\
**Post date:** [March 4, 2018, 1:30pm UTC](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264/36 "2018-03-04T13:30:53Z")

</div>

this still doeesnt work as i have followed everything to the bone and i get all the new fields but still doesn’t fetch the Airport

&nbsp;

[http://prntscr.com/imo2dz](http://prntscr.com/imo2dz)

---

<div class="post-metadata">

**Author:** ![ATACEO](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/a/858c86/32.png) [@ATACEO](https://forum.phpvms.net/u/ATACEO)\
**Post date:** [March 4, 2018, 1:44pm UTC](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264/37 "2018-03-04T13:44:22Z")

</div>

Ok I have was using phpvms v2 and now I have uploaded v 5.5.2 and it works sort of.&nbsp; Now when I enter an Airport ICAO code and hit lookup the popup goes away and then I get this message

“Some fields were blank!”&nbsp;&nbsp;and nothing addded.

---

<div class="post-metadata">

**Author:** ![Michael2015](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/m/41988e/32.png) [@Michael2015](https://forum.phpvms.net/u/Michael2015)\
**Post date:** [March 4, 2018, 1:50pm UTC](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264/38 "2018-03-04T13:50:38Z")

</div>

well i get nothign mate using phpvms 5x

---

<div class="post-metadata">

**Author:** ![ATACEO](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/a/858c86/32.png) [@ATACEO](https://forum.phpvms.net/u/ATACEO)\
**Post date:** [March 4, 2018, 2:01pm UTC](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264/39 "2018-03-04T14:01:25Z")

</div>

> 9 minutes ago, Michael2015 said:
> 
> well i get nothign mate using phpvms 5x

Yeah mine doesn’t fetch anything either.&nbsp; I acts like it but then I get the error message posted above.&nbsp; Does your pop-up box go away after you click on the “Look Up” button?

---

<div class="post-metadata">

**Author:** ![Michael2015](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/m/41988e/32.png) [@Michael2015](https://forum.phpvms.net/u/Michael2015)\
**Post date:** [March 4, 2018, 2:15pm UTC](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264/40 "2018-03-04T14:15:42Z")

</div>

think when you change these nothing works i would maybe make a back up&nbsp;

[Previous page](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264.md?page=1)

[Next page](https://forum.phpvms.net/t/new-airport-lookup-server-with-extended-data/12264.md?page=3)
