From 35fdb7af0f535a2d3bdeada3fde6693282b51004 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Thu, 24 May 2012 00:26:16 +0200 Subject: [PATCH] more verbose error messages --- nominatim/index.c | 2 +- utils/setup.php | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/nominatim/index.c b/nominatim/index.c index 368fd8a5..9667e505 100644 --- a/nominatim/index.c +++ b/nominatim/index.c @@ -145,7 +145,7 @@ void nominatim_index(int rank_min, int rank_max, int num_threads, const char *co writer = nominatim_exportXMLStart(structuredoutputfile); } - fprintf(stderr, "Starting indexing rank (%i to %i) using %i treads\n", rank_min, rank_max, num_threads); + fprintf(stderr, "Starting indexing rank (%i to %i) using %i threads\n", rank_min, rank_max, num_threads); for (rank = rank_min; rank <= rank_max; rank++) { diff --git a/utils/setup.php b/utils/setup.php index 9a238628..1deb060a 100755 --- a/utils/setup.php +++ b/utils/setup.php @@ -121,7 +121,11 @@ $bDidSomething = true; $osm2pgsql = CONST_Osm2pgsql_Binary; - if (!file_exists($osm2pgsql)) fail("please download and build osm2pgsql"); + if (!file_exists($osm2pgsql)) + { + echo "Please download and build osm2pgsql.\nIf it is already installed, check the path in your local settings (settings/local.php) file.\n"; + fail("osm2pgsql not found in '$osm2pgsql'"); + } $osm2pgsql .= ' -lsc -O gazetteer --hstore'; $osm2pgsql .= ' -C '.$iCacheMemory; $osm2pgsql .= ' -d '.$aDSNInfo['database'].' '.$aCMDResult['osm-file']; @@ -479,7 +483,12 @@ { $bDidSomething = true; $sTargetDir = $aCMDResult['create-website']; - if (!is_dir($sTargetDir)) fail('please specify a directory to setup'); + if (!is_dir($sTargetDir)) + { + echo "You must create the website directory before calling this function.\n"; + fail("Target directory does not exist."); + } + @symlink(CONST_BasePath.'/website/details.php', $sTargetDir.'/details.php'); @symlink(CONST_BasePath.'/website/reverse.php', $sTargetDir.'/reverse.php'); @symlink(CONST_BasePath.'/website/search.php', $sTargetDir.'/search.php'); -- 2.39.5