i have change user as normal user to execute that command, everything working well.
But when i move website/* to my documentRoot Apache2, i cannot access it via browser.
../utils/setup.php --create-db --create-functions --create-m
inimal-tables
Create DB
Create DB (2)
PHP Warning: log() expects parameter 1 to be double, string given in /home/user/Map/src/nominatim/lib/
lib.php on line 6
unable to find /usr/share/postgresql/9.0/contrib/_int.sql
It’s like that script wrong to indentify my postgresql folder.
the script is looking for /usr/share/postgresql/9.0/contrib/_int.sql,
but the path is different with Postgresql 8.4
so you have to change every 9.0 in the script to 8.4
But on end of line of output, i have got warning like bellow .
[output]
INSERT 0 1
INSERT 0 1
INSERT 0 1
...
SET
SET
CREATE TABLE
SET
SET
SET
SET
SET
SET
SET
SET
CREATE TABLE
ALTER TABLE
Functions
PHP Warning: log() expects parameter 1 to be double, string given in /home/user/Map/src/nominatim/lib/lib.php on line 6
nominatim module not built
i’m running script as user which have role on postgresql but not as postgres. is it problem ?
This is line 6 on lib.php
function fail($sError, $sUserError = false)
{
if (!$sUserError) $sUserError = $sError;
log('ERROR:'.$sError); //line 6
echo $sUserError."\n";
exit;
}
[Tue Jan 03 21:27:02 2012] [error] [client 118.137.0.31] PHP Notice: Undefined index: PATH_INFO in /home/user/Map/src/nominatim/website/search.php on line 95
[Tue Jan 03 21:27:02 2012] [error] [client 118.137.0.31] PHP Notice: Use of undefined constant CONST_Search_AreaPolygons - assumed 'CONST_Search_AreaPolygons' in /home/user/Map/src/nominatim/lib/template/search-html.php on line 327
i have checked on /home/user/Map/src/nominatim/website/search.php on line 95, i get script bellow :
$sQuery = (isset($_GET['q'])?trim($_GET['q']):'');
if (!$sQuery && $_SERVER['PATH_INFO'] && $_SERVER['PATH_INFO'][0] == '/') /* >> line 95
{
$sQuery = substr($_SERVER['PATH_INFO'], 1);
// reverse order of '/' seperated string
$aPhrases = explode('/', $sQuery);
$aPhrases = array_reverse($aPhrases);
$sQuery = join(', ',$aPhrases);
}
Then i check on /home/user/Map/src/nominatim/lib/template/search-html.php line 327.and i get this line one