SQL Errors on install from CLI install_db.php
rhaamo opened this issue · 3 comments
Hello,
I'm trying to install on postgresql (11)+nginx+php (7.2-fpm) and I got lot of timeout issues and give up installing from web, my config was updated from web, and I kept it, I just setted $globalInstalled = FALSE;
and installed from CLI, but I'm getting errors:
# on postgresql server: dropdb flightairmap && createdb -O flightairmap flightairmap
root@patate:/var/www/flightairmap/install# php install_db.php
Create and import all tables...Done !
Populate all tables...
Routes from FlightAirMap website : Download...Gunzip...Add to DB...error : SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "routes" does not exist
LINE 1: DELETE FROM routes WHERE Source = '' OR Source = 'website_fa...
^Translation from FlightAirMap website : Download...Gunzip...Add to DB...error : SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "translation" does not exist
LINE 1: DELETE FROM translation WHERE Source = '' OR Source = 'websi...
^ModeS from FlightAirMap website : Download...Gunzip...Add to DB...error : SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "aircraft_modes" does not exist
LINE 1: DELETE FROM aircraft_modes WHERE Source = '' OR Source = 'we...
^Modes OGN: Download...Add to DB...error : SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "aircraft_modes" does not exist
LINE 1: DELETE FROM aircraft_modes WHERE Source = '' OR Source IS NU...
^Banned airlines in Europe from FlightAirMap website : Download...Add to DB...error : SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "airlines" does not exist
LINE 1: UPDATE airlines SET ban_eu = 0
^Blocked aircraft from FlightAirMap website : Download...Gunzip...Add to DB...error : SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "aircraft_block" does not exist
LINE 1: DELETE FROM aircraft_block WHERE Source = '' OR Source = 'we...
^
Install waypoints...(VERY slow!)Done !
Install airspace...PHP Notice: Undefined variable: _SESSION in /var/www/flightairmap/install/class.update_db.php on line 2031
PHP Notice: Undefined variable: _SESSION in /var/www/flightairmap/install/class.update_db.php on line 2031
Done !
All is now installed ! Thanks
You need to run cron-sbs.php as a daemon. You can use init script in the install/init directory.
root@patate:/var/www/flightairmap/install#
Are thoses errors blocking ?
Also is doing php install_db.php
then php populate_all.php
sufficient for CLI install ?
flightairmap=# \dt
Did not find any relations.
Mhhhh, looks like install_db.php
haven't done anything and silently fails.
EDIT:
ended up using 36000s
as timeouts and everything went mostly fine, but EXTREMELY SLOWLY. checked settings and I have transaction at true. the create-import and each populate took between 3 and 10 minutes each.
Then countries failed:
Error : error (import /var/www/flightairmap/install/tmp/countries.sql) : SQLSTATE[42704]: Undefined object: 7 ERROR: type "geometry" does not exist LINE 13: ogc_geom geometry(MultiPolygon,4326) ^
About the geometry error, the postgis
extension wasn't created by the web setup.. created manually in the postgres shell and it seems to work.
I think it might have been a right issue (my flightairmap pgsql user isn't super-user, so indeed it can't CREATE EXTENSION by itself), and again silent error without notifying it.
Install can only be done via web interface (at least install via script is not supported).
If you have PHP timeout you should increase max_execution_time in php.ini config file.