1 Frequently Asked Questions
2 ==========================
4 Running Your Own Instance
5 -------------------------
7 ### Can I import only a few countries and also keep them up to date?
9 You should use the extracts and updates from http://download.geofabrik.de.
10 For the intial import, download the countries you need and merge them.
11 See [OSM Help](https://help.openstreetmap.org/questions/48843/merging-two-or-more-geographical-areas-to-import-two-or-more-osm-files-in-nominatim)
12 for examples how to do that. Use the resulting single osm file when
15 For updates you need to download the change files for each country
16 once per day and apply them **separately** using
18 ./utils/update.php --import-diff <filename> --index
20 See [this issue](https://github.com/openstreetmap/Nominatim/issues/60#issuecomment-18679446)
21 for a script that runs the updates using osmosis.
23 ### My website shows: `XML Parsing Error: XML or text declaration not at start of entity Location</code>.`
25 Make sure there are no spaces at the beginning of your `settings/local.php` file.
31 ### I accidentally killed the import process after it has been running for many hours. Can it be resumed?
33 It is possible if the import already got to the indexing stage.
34 Check the last line of output that was logged before the process
35 was killed. If it looks like this:
37 Done 844 in 13 @ 64.923080 per second - Rank 26 ETA (seconds): 7.886255
39 then you can resume with the following command:
41 ./utils/setup.php --index --create-search-indices --create-country-names
43 If the reported rank is 26 or higher, you can also safely add `-index-noanalyse`.
46 ### When running the setup.php script I get a warning:
47 `PHP Warning: file_get_contents(): open_basedir restriction in effect.`
49 You need to adjust the [open_basedir](http://www.php.net/manual/en/ini.core.php#ini.open-basedir) setting
50 in your PHP configuration (php.ini file). By default this setting may look like this:
52 open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/
54 Either add reported directories to the list or disable this setting temporarily by
55 dding ";" at the beginning of the line. Don't forget to enable this setting again
56 once you are done with the PHP command line operations.
59 ### The Apache log contains lots of PHP warnings like this:
60 `PHP Warning: date_default_timezone_set() function.`
62 You should set the default time zone as instructed in the warning in
63 your `php.ini` file. Find the entry about timezone and set it to
66 ; Defines the default timezone used by the date functions
67 ; http://php.net/date.timezone
68 date.timezone = 'America/Denver'
72 echo "date.timezone = 'America/Denver'" > /etc/php.d/timezone.ini
75 ### When running the import I get a version mismatch:
76 `COPY_END for place failed: ERROR: incompatible library "/opt/Nominatim/module/nominatim.so": version mismatch`
78 pg_config seems to use bad includes sometimes when multiple versions
79 of PostgreSQL are available in the system. Make sure you remove the
80 server development libraries (`postgresql-server-dev-9.1` on Ubuntu)
81 and recompile (`cmake .. && make`).
84 ### I see the error: `function transliteration(text) does not exist`
86 Reinstall the nominatim functions with `setup.php --create--functions`
87 and check for any errors, e.g. a missing `nominatim.so` file.
90 ### The website shows: `Could not get word tokens`
92 The server cannot access your database. Add `&debug=1` to your URL
93 to get the full error message.
96 ### On CentOS the website shows `could not connect to server: No such file or directory`
98 On CentOS v7 the PostgreSQL server is started with `systemd`.
99 Check if `/usr/lib/systemd/system/httpd.service` contains a line `PrivateTmp=true`.
100 If so then Apache cannot see the `/tmp/.s.PGSQL.5432` file. It's a good security feature,
101 so use the [[#PostgreSQL_UNIX_Socket_Location_on_CentOS|preferred solution]]
103 However, you can solve this the quick and dirty way by commenting out that line and then run
105 sudo systemctl daemon-reload
106 sudo systemctl restart httpd
109 ### Setup.php fails with the message: `DB Error: extension not found`
111 Make sure you have the Postgres extensions hstore and postgis installed.
112 See the installation instruction for a full list of required packages.
114 ### When running the setup.php script I get a error:
115 `Cannot redeclare getDB() (previously declared in /your/path/Nominatim/lib/db.php:4)`
117 The message is a bit misleading as PHP needs to load the file `DB.php` and
118 instead re-loads Nominatim's `db.php`. To solve this make sure you
119 have the [http://pear.php.net/package/DB/ Pear module 'DB'] installed.
123 ### I forgot to delete the flatnodes file before starting an import
125 That's fine. For each import the flatnodes file get overwritten.
126 See https://help.openstreetmap.org/questions/52419/nominatim-flatnode-storage
127 for more information.