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
-#!/usr/bin/php -Cq
+#!@PHP_BIN@ -Cq
<?php
require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
-#!/usr/bin/php -Cq
+#!@PHP_BIN@ -Cq
<?php
require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
-#!/usr/bin/php -Cq
+#!@PHP_BIN@ -Cq
<?php
// Script to extract structured city and street data
// from a running nominatim instance as CSV data
$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%\'
-#!/usr/bin/php -Cq
+#!@PHP_BIN@ -Cq
<?php
require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
-#!/usr/bin/php -Cq
+#!@PHP_BIN@ -Cq
<?php
require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
-#!/usr/bin/php -Cq
+#!@PHP_BIN@ -Cq
<?php
$sFile = 'sample.log.txt'; // Apache log file
-#!/usr/bin/php -Cq
+#!@PHP_BIN@ -Cq
<?php
require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
-#!/usr/bin/php -Cq
+#!@PHP_BIN@ -Cq
<?php
require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
-#!/usr/bin/php -Cq
+#!@PHP_BIN@ -Cq
<?php
require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
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) {
-#!/usr/bin/php -Cq
+#!@PHP_BIN@ -Cq
<?php
require_once(dirname(dirname(__FILE__)).'/settings/settings.php');