]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge branch 'customPHP1' of https://github.com/ThomasBarris/Nominatim into ThomasBar...
authorSarah Hoffmann <lonvia@denofr.de>
Thu, 23 Aug 2018 18:41:44 +0000 (20:41 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Thu, 23 Aug 2018 18:41:44 +0000 (20:41 +0200)
12 files changed:
CMakeLists.txt
utils/blocks.php
utils/country_languages.php
utils/export.php
utils/importWikipedia.php
utils/imports.php
utils/query.php
utils/server_compare.php
utils/setup.php
utils/specialphrases.php
utils/update.php
utils/warm.php

index 2096c43dc9efe189992ddf5047678c5f5a84439e..afd8159466eb77f7d8d44fb4e36860ceea9aba4a 100644 (file)
@@ -77,6 +77,16 @@ find_package(BZip2 REQUIRED)
 find_package(LibXml2 REQUIRED)
 include_directories(${LIBXML2_INCLUDE_DIR})
 
+# Setting PHP binary variable as to command line (prevailing) or auto detect
+if (NOT PHP_BIN)
+     find_program (PHP_BIN php)
+endif()
+# sanity check if PHP binary exists
+if (NOT EXISTS ${PHP_BIN})
+    message(FATAL_ERROR "PHP binary not found install php or provide location by -DPHP_BIN=/path/php ")
+endif()
+message (STATUS "Setting PHP_BIN= " ${PHP_BIN})
+
 #-----------------------------------------------------------------------------
 #
 # Setup settings and paths
index 602df0bc09822e763c0e59bc845ce3793391a7c4..761ab9e4f004c11097093da1b16891dba8f1b6d5 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/php -Cq
+#!@PHP_BIN@ -Cq
 <?php
 
 require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
index 19ad25b82570833816540f7b257614f201482267..b1a7ab1185336419f3659de49afeaf7a318cf3ae 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/php -Cq
+#!@PHP_BIN@ -Cq
 <?php
 
 require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
index 13f062d4f637bad6d959a55e3e630d4814fd85a9..aafb3759ab2ee399611b5c53dfe6260a4dfb869b 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/php -Cq
+#!@PHP_BIN@ -Cq
 <?php
     // Script to extract structured city and street data
     // from a running nominatim instance as CSV data
index b767adb36ff2774ea8b208adcc670c5866de65fa..6e42975481cbbd35b8fafb92ddbe7b4f9652a045 100755 (executable)
@@ -309,7 +309,7 @@ if (isset($aCMDResult['parse-wikipedia'])) {
     $oDB =& getDB();
     $sSQL = 'select page_title from content where page_namespace = 0 and page_id %10 = ';
     $sSQL .= $aCMDResult['parse-wikipedia'];
-    $sSQL .= ' and (page_content ilike \'%{{Coord%\' or (page_content ilike \'%lat%\' and page_content ilike \'%lon%\'))'
+    $sSQL .= ' and (page_content ilike \'%{{Coord%\' or (page_content ilike \'%lat%\' and page_content ilike \'%lon%\'))';
     $aArticleNames = $oDB->getCol($sSQL);
     /* $aArticleNames = $oDB->getCol($sSQL = 'select page_title from content where page_namespace = 0
         and (page_content ilike \'%{{Coord%\' or (page_content ilike \'%lat%\'
index 07bc9c4512176da12e67c323854adbb22d41792b..9d1085f041e78ed5953c0ee6abc050f0273cf1e1 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/php -Cq
+#!@PHP_BIN@ -Cq
 <?php
 
 require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
index 53ce176cf3aea6168adadb7b717b893833196404..e3e2e7b8737eaac707fb6a60a525e01055b56f58 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/php -Cq
+#!@PHP_BIN@ -Cq
 <?php
 
 require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
index 39016d072a17522b741bbb84bffb2c51fc048d37..0a27c484914fddb169b11dfe47184848d754bbc9 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/php -Cq
+#!@PHP_BIN@ -Cq
 <?php
 
 $sFile = 'sample.log.txt'; // Apache log file
index 95eda0f4a085726ef12a51b4f43d3e126ce0f33a..d8cceba474a0ac11897ab0ad107da12995656574 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/php -Cq
+#!@PHP_BIN@ -Cq
 <?php
 
 require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
index 8378b37339a1b1f64c7594d5b513a1888ce27d73..7d22df50027ecc534d311d0d10ebc4d4423549a0 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/php -Cq
+#!@PHP_BIN@ -Cq
 <?php
 
 require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
index c70bdf5461e25eac9798f87fd78630e35353d3f0..414fadb5afa51a68e63c3a486c77ad8f7428f876 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/php -Cq
+#!@PHP_BIN@ -Cq
 <?php
 
 require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
@@ -99,7 +99,7 @@ if ($aResult['init-updates']) {
         fail('pyosmium-get-changes not found or not usable');
     }
     if (!$aResult['no-update-functions']) {
-        $sSetup = CONST_InstallPath.'/utils/setup.php';
+        $sSetup ='@PHP_BIN@ '. CONST_InstallPath.'/utils/setup.php';
         $iRet = -1;
         passthru($sSetup.' --create-functions --enable-diff-updates', $iRet);
         if ($iRet != 0) {
index 0ac13c469d6918c936f97a219f0711fa11c2f453..653bcf100c2fc63a6a009324947d2b226055336d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/php -Cq
+#!@PHP_BIN@ -Cq
 <?php
 
 require_once(dirname(dirname(__FILE__)).'/settings/settings.php');