diff --git a/Containerfile.data_init b/Containerfile.data_init index 2274490..4604db4 100644 --- a/Containerfile.data_init +++ b/Containerfile.data_init @@ -5,7 +5,7 @@ COPY ./data_init/*.sql /var/sunders/init.sql CMD mariadb --host="$MYSQL_HOST" \ --user="$CAMERA_USER" \ - --password="$CAMERA_USER_PASSWD" \ + --password="$CAMERA_USER_PASSWORD" \ --skip-ssl \ ${MYSQL_DB:+--database="$MYSQL_DB"} \ < "/var/sunders/init.sql" diff --git a/home/sunders/update_cameras/update_camera.php b/home/sunders/update_cameras/update_camera.php index 21a2aaa..75bd3b4 100755 --- a/home/sunders/update_cameras/update_camera.php +++ b/home/sunders/update_cameras/update_camera.php @@ -15,7 +15,7 @@ $id = 0; $latitude = 0; $longitude = 0; -$mysqli = new mysqli(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWD, MYSQL_DB); +$mysqli = new mysqli(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DB); if($mysqli->connect_errno) { echo "Error while connecting to DB : $mysqli->error \n" ; diff --git a/home/sunders/update_cameras/update_statistics.php b/home/sunders/update_cameras/update_statistics.php index f6b9332..f6bcc7a 100644 --- a/home/sunders/update_cameras/update_statistics.php +++ b/home/sunders/update_cameras/update_statistics.php @@ -4,7 +4,7 @@ include "config.php"; if (USE_STATISTICS) { - $mysqli = new mysqli(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWD, MYSQL_DB); + $mysqli = new mysqli(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DB); if ($mysqli->connect_errno) { echo "Error while connecting to DB : ".$mysqli->error." \n" ; diff --git a/utils/config.php b/utils/config.php index cb479d5..62ff728 100644 --- a/utils/config.php +++ b/utils/config.php @@ -5,7 +5,7 @@ define('REPLICATE_URL', 'https://planet.openstreetmap.org/replication/minute'); define('MYSQL_HOST', getenv('MYSQL_HOST')); define('MYSQL_DB', getenv('MYSQL_DB')); define('MYSQL_USER', getenv('MYSQL_USER')); -define('MYSQL_PASSWD', getenv('MYSQL_PASSWD')); +define('MYSQL_PASSWORD', getenv('MYSQL_PASSWORD')); define('USE_STATISTICS', false); define('WEBSERVICE_COUNTRY_URL', 'http://api.geonames.org/countryCode'); diff --git a/utils/get_sync_state.php b/utils/get_sync_state.php index cdbe28a..a27b7db 100755 --- a/utils/get_sync_state.php +++ b/utils/get_sync_state.php @@ -2,7 +2,7 @@ include "config.php"; -$mysqli = new mysqli(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWD, MYSQL_DB); +$mysqli = new mysqli(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DB); if($mysqli->connect_errno) { echo "Error while connecting to DB : $mysqli->error \n" ; diff --git a/utils/init_db.php b/utils/init_db.php index aa1d078..90d6978 100644 --- a/utils/init_db.php +++ b/utils/init_db.php @@ -2,15 +2,15 @@ // Admin credentials (must have privileges to create DB/users) $dbHost = getenv('MYSQL_HOST'); $dbAdmin = getenv('MYSQL_USER'); -$dbPassword = getenv('MYSQL_PASSWD'); +$dbPassword = getenv('MYSQL_PASSWORD'); $dbName = getenv('MYSQL_DB'); // Variables for new users $cameraUser = getenv('CAMERA_USER'); -$cameraPassword = getenv('CAMERA_USER_PASSWD'); +$cameraPassword = getenv('CAMERA_USER_PASSWORD'); $camSelectUser = getenv('CAMERA_SELECT_USER'); -$camSelectPassword = getenv('CAMERA_SELECT_USER_PASSWD'); +$camSelectPassword = getenv('CAMERA_SELECT_USER_PASSWORD'); // Connect to MySQL $conn = new mysqli($dbHost, $dbAdmin, $dbPassword); diff --git a/utils/update_camera.php b/utils/update_camera.php index bd8e7f6..dc88e48 100755 --- a/utils/update_camera.php +++ b/utils/update_camera.php @@ -15,7 +15,7 @@ $id = 0; $latitude = 0; $longitude = 0; -$mysqli = new mysqli(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWD, MYSQL_DB); +$mysqli = new mysqli(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DB); if($mysqli->connect_errno) { echo "Error while connecting to DB : $mysqli->error \n" ; diff --git a/www/sunders/camera.php b/www/sunders/camera.php index 83ad163..97a77e7 100644 --- a/www/sunders/camera.php +++ b/www/sunders/camera.php @@ -266,7 +266,7 @@ $divDiag2 = ($divWidth * $divWidth) + ($divHeight * $divHeight); /* Connect to database */ - $mysqli = new mysqli(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWD, MYSQL_DB); + $mysqli = new mysqli(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DB); if($mysqli->connect_errno) { header('Content-type: application/json'); $result = '{"error":"error while connecting to db : ' . $mysqli->error . '"}'; diff --git a/www/sunders/config.php b/www/sunders/config.php index 4d934ec..c874eca 100644 --- a/www/sunders/config.php +++ b/www/sunders/config.php @@ -1,19 +1,15 @@ + define('USE_STATISTICS', false); +?> \ No newline at end of file diff --git a/www/sunders/stats/index.php b/www/sunders/stats/index.php index 029e42c..7a0dac4 100644 --- a/www/sunders/stats/index.php +++ b/www/sunders/stats/index.php @@ -138,7 +138,7 @@ $statsQueryObject = $levelObject->{$statsKey}; /* Connect to database */ - $mysqli = new mysqli(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWD, MYSQL_DB); + $mysqli = new mysqli(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DB); if($mysqli->connect_errno) { echo 'Error while connecting to DB : $mysqli->error \n' ; exit(1);