Basic status page for monitoring nominatim is working

This commit is contained in:
Brian Quinion
2013-01-24 12:42:34 +00:00
parent 1d836f6c5c
commit fca2d00617
3 changed files with 28 additions and 0 deletions

26
website/status.php Normal file
View File

@@ -0,0 +1,26 @@
<?php
@define('CONST_ConnectionBucket_PageType', 'Status');
require_once(dirname(dirname(__FILE__)).'/lib/init-website.php');
$oDB =& getDB();
if (!$oDB || PEAR::isError($oDB))
{
echo "ERROR: No database";
exit;
}
$iWordID = $oDB->getOne("select word_id,word_token, word, class, type, location, country_code, operator, search_name_count from word where word_token in (' a')");
if (PEAR::isError($iWordID))
{
echo "ERROR: Query failed";
exit;
}
if (!$iWordID)
{
echo "ERROR: No value";
exit;
}
echo "OK";
exit;