Ysurac / FlightAirMap

Open source project displaying live aircrafts, ships or trackers on 2D/3D map. Browse through the data based on a particular aircraft, airline, airport, tracker or vessel to search through the database or see extensive statistics. Can use ADS-B in SBS1 format (dump1090, Radarcape,...), VRS, VA (VATSIM, IVAO whazzup.txt, phpvms,...), ACARS (acarsdec, acarsdeco2), APRS, AIS as datasource.
https://www.flightairmap.com/
GNU Affero General Public License v3.0
523 stars 158 forks source link

Map not shown #203

Closed enannos closed 8 years ago

enannos commented 8 years ago

Hi,

the map on the main screen is not shown. I've used the default settings.php(added my mysql settings) , also changed the provider to Openstreetmap and still, nothing is shown.

What am I doing wrong?

thanks

Ysurac commented 8 years ago

Check your Apache or Nginx configuration is like that : https://github.com/Ysurac/FlightAirMap/wiki/Installation

Ysurac commented 8 years ago

even without this config map should display... Try another provider maybe a problem with OSM.

enannos commented 8 years ago

Hello Ysurac.

I've tried everything, still no luck. I am using Apache on Debian(raspbian to be exact).

The Apache error.log shows:

PHP Fatal error: Call to undefined function array_column() in /var/www/html/flightairmap/index.php on line 191, referer: http://192.168.178.102/flightairmap/

Ysurac commented 8 years ago

This should work better with latest commit. Array_column is not available before PHP 5.5.0, so I added a check for that. What is your PHP version ?

enannos commented 8 years ago

Hi,

it is the PHP 5.4.45-0+deb7u4 (cli) (built: Jun 29 2016 17:23:52)

I am updating right now to 5.5 :)

Ysurac commented 8 years ago

With my fix, this should work with 5.4 (at least for this error).

enannos commented 8 years ago

Hi,

the error is away but the map is still not shown. I really do not get it. The Settings looks like this:

<?php //INSTALLED OR NOT ? $globalInstalled = TRUE;

//GLOBAL SITE NAME $globalName = 'acars';

// GLOBAL URL $globalURL = 'http://192.168.178.102/flightairmap/'; //NOTE: If I remove the url or if I do not insert at least '/flightmap', php shows only the html version of the page

// Logo URL $logoURL = '/images/logo2.png';

// Activate debug $globalDebug = TRUE;

// LANGUAGE $globalLanguage = 'DE'; // Used only for wikipedia links for now

// MAP PROVIDER $globalMapProvider = 'OpenStreetMap'; // Can be Mapbox, OpenStreetMap, MapQuest-OSM or MapQuest-Aerial $globalMapboxId = 'test'; // Mapbox id $globalMapboxToken = ''; // Mapbox token //COVERAGE AREA (its based on a box model. i.e. top-left | top-right | bottom-right | bottom-left) $globalLatitudeMax = '46.92'; //the maximum latitude (north) $globalLatitudeMin = '42.14'; //the minimum latitude (south) $globalLongitudeMax = '6.2'; //the maximum longitude (west) $globalLongitudeMin = '1.0'; //the minimum longitude (east)

$globalCenterLatitude = '46.38'; //the latitude center of your coverage area $globalCenterLongitude = '5.29';//the longitude center of your coverage area

$globalLiveZoom = '9'; //default zoom on Live Map

// FLIGHTS MUST BE INSIDE THIS CIRCLE $globalDistanceIgnore = array(); // ^^ example for 100km : array('latitude' => '46.38','longitide' => '5.29','distance' => '100');

// DATABASE CONNECTION LOGIN $globalDBdriver = 'mysql'; // PDO driver used. Tested with mysql, maybe pgsql or others work... $globalDBhost = 'localhost'; //database connection url $globalDBuser = 'XXXXXX'; //database username $globalDBpass = 'XXXXXXX'; //database password $globalDBname = 'acars'; //database name $globalTransaction = TRUE; //Activate database transaction support

//FLIGHTAWARE API INFO $globalFlightAware = FALSE; //set to TRUE to use FlightAware as data import $globalFlightAwareUsername = ''; //FlightAware Username $globalFlightAwarePassword = ''; //FlightAware Password/API key

// TIMEZONE $globalTimezone = 'Europe/Berlin';

// DAEMON $globalDaemon = TRUE; // Run cron-sbs.php as daemon (don't work well if source is a real SBS1 device) $globalCronEnd = '60'; //the script run for xx seconds if $globalDaemon is disable in SBS mode

// FORK $globalFork = FALSE; // Allow cron-sbs.php to fork to fetch schedule, no more schedules fetch if set to FALSE

// MINIMUM TIME BETWEEN UPDATES FOR HTTP SOURCES (in seconds) $globalMinFetch = '50';

// DISPLAY FLIGHT INTERVAL ON MAP (in seconds) $globalLiveInterval = '200'; // MINIMAL CHANGE TO PUT IN DB $globalCoordMinChange = '0.02'; // minimal change since last message for latitude/longitude (limit write to DB)

// LIVE MAP REFRESH (in seconds) $globalMapRefresh = '30';

// IDLE TIMEOUT (in minutes) $globalMapIdleTimeout = '30';

// DISPLAY INFO OF FLIGHTS IN A POPUP $globalMapPopup = FALSE;

// DISPLAY ROUTE OF FLIGHT $globalMapRoute = TRUE;

// DISPLAY FLIGHTS PATH HISTORY $globalMapHistory = FALSE;

// FLIGHT ESTIMATION BETWEEN UPDATES $globalMapEstimation = TRUE;

// WRAP MAP OR REPEAT $globalMapWrap = TRUE; // WRAP MAP OR REPEAT $globalMapWrap = TRUE;

// ALLOW SITE TRANSLATION $globalTranslate = TRUE;

// UNITS $globalUnitDistance = 'km'; // km, nm or mi $globalUnitAltitude = 'm'; // m or feet $globalUnitSpeed = 'kmh'; // kmh, knots or mph

// * Virtual flights * //IVAO $globalIVAO = FALSE;

//VATSIM $globalVATSIM = FALSE;

//phpVMS $globalphpVMS = FALSE; //User can choose between IVAO, VATSIM or phpVMS $globalMapVAchoose = FALSE; // ****

//ADS-B, SBS1 FORMAT $globalSBS1 = FALSE; //set to FALSE to not use SBS1 as data import $globalSourcesTimeOut = ''; $globalSourcesupdate = '10'; //Put data in DB after xx seconds/flight

//DATA SOURCES $globalSources = array(array('host' => '127.0.0.1','port' => '30003','name' => '','format' => 'auto','sourcestats' => FALSE)); // ^^ in the form array(array(host => 'host1', 'port' => 'port1','name' => 'first source','format' => 'sbs'),array('host' => 'host2', 'port' => 'port2','name' => 'Othe$

//ACARS Listen in UDP $globalACARS = TRUE; $globalACARSHost = '0.0.0.0'; // Local IP to listen $globalACARSPort = '9999'; $globalACARSArchive = array('10','80','81','82','3F'); // labels of messages to archive $globalACARSArchiveKeepMonths = '0'; //APRS configuration (for glidernet) $globalAPRSversion = $globalName.' using FlightAirMap'; $globalAPRSssid = 'FAM'; $globalAPRSfilter = 'r/'.$globalCenterLatitude.'/'.$globalCenterLongitude.'/250.0';

//Minimal distance to tell if a flight is arrived to airport (in km) $globalClosestMinDist = '50';

// To display Squawk usage we need Squawk country for now $globalSquawkCountry = 'UK';

//BIT.LY API INFO (used in the search page for a shorter URL) $globalBitlyAccessToken = ''; //the access token from the bit.ly API

//British Airways API info $globalBritishAirwaysKey = 'XXXXXXXXXXXXXXXXXX';

// Lufhansa API info $globalLufthansaKey = array('key' => 'XXXXXX','secret' => 'XXXXXX'); // Transavia API info $globalTransaviaKey = '';

//ignore the flights during imports that have the following airports ICAO (departure/arrival) associated with them $globalAirportIgnore = array(); //accept the flights during imports that have the following airports ICAO (departure/arrival) associated with them $globalAirportAccept = array();

//ignore the flights that have the following airline ICAO $globalAirlineIgnore = array(); //accept the flights that have the following airline ICAO $globalAirlineAccept = array();

//accept the flights that have the following pilot id (only for VA) $globalPilotIdAccept = array();

// * Archive * //Archive all data $globalArchive = FALSE;

//Archive data olders than xx months (if globalArchive enabled, else delete) (0 to disable) $globalArchiveMonths = '0';

//Archive previous year (if globalArchive enabled, else delete) $globalArchiveYear = FALSE;

//Keep Archive track of flight for xx months (0 to disable) $globalArchiveKeepTrackMonths = '0';

//Keep Archive of flight for xx months (0 to disable) $globalArchiveKeepMonths = '0'; // ****

//NOTAM $globalNOTAM = TRUE; $globalNOTAMSource = ''; //URL of your feed from notaminfo.com

//METAR $globalMETAR = TRUE; $globalMETARcycle = TRUE; // If update_db.php in cron job, all METAR are downloaded from NOAA // else put an url as METAR source, can be vatsim. $globalMETARurl = ''; // Use {icao} to indicate where airport icao must be put in url

//Retrieve private Owner $globalOwner = TRUE;

// * Aircraft pics * //Retrieve Image from externals sources $globalAircraftImageFetch = TRUE; //Sources for Aircraft image $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters','customsources'); // Custom source configuration {registration} will be replaced by aircraft registration (exif get copyright from exif data for each pic) // example of config : $globalAircraftImageCustomSources = array('thumbnail' => 'http://pics.myurl.com/thumbnail/{registration}.jpg','original' => 'http://myurl/origin$ // ****

//Retrieve schedules from externals sources (set to FALSE for IVAO or if $globalFork = FALSE) $globalSchedulesFetch = TRUE; //Sources for airline schedule if not official airline site $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware');

//Retrieve translation from external sources (set to FALSE for IVAO) $globalTranslationFetch = TRUE; //Sources for translation, to find name of flight from callsign $globalTranslationSources = array();

$globalDBport = '';

$globalGoogleAPIKey = '';

$globalBingMapKey = '';

$globalHereappID = '';

$globalHereappCode = '';

$globalMapQuestKey = '';

$globalAircraftSize = ''; $globalAPRS = TRUE;

$globalMapAltitudeColor = TRUE;

$globalAircraftIconColor = '1a3151';

$globalAirportZoom = '7';

$globalAirportPopup = FALSE; ?>

enannos commented 8 years ago

Found something! Looks like, firefox is not supporting it. Just tried with Chrome and the map is shown!

Ysurac commented 8 years ago

$globalURL should only have the directory, so /flightairmap. If you have SBS as source (Dump1090, ModeSMixer,...) $globalSBS1 should be set to TRUE. What is your version of Firefox ? It work with Firefox 48 for me.

enannos commented 8 years ago

Hi, I had the 47.0.1,just updated to 48. I have also updated Apache to 2.4.0, please notice that if I use -MultiViews in the configuration, the Apache won't start.


AH00526: Syntax error on line 6 of /etc/apache2/sites-enabled/000-default.conf: Either all Options must start with + or -, or no Option may. Action 'configtest' failed. The Apache error log may have more information.


So, without -MultiViews, the map is shown on Chrome but not in Firefox.

Ysurac commented 8 years ago

For the -Multiviews, other options should have a +, this seems to be needed now. I fixed the wiki. But this should not make any change for Firefox or Chrome, this is needed to access all pages like stats,...