[Mapbender-commits] r10019 - trunk/mapbender/tools

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Dec 17 05:32:00 PST 2018


Author: armin11
Date: 2018-12-17 05:32:00 -0800 (Mon, 17 Dec 2018)
New Revision: 10019

Modified:
   trunk/mapbender/tools/mod_monitorCapabilities_main.php
Log:
Fix for usage under php7+

Modified: trunk/mapbender/tools/mod_monitorCapabilities_main.php
===================================================================
--- trunk/mapbender/tools/mod_monitorCapabilities_main.php	2018-12-17 13:22:00 UTC (rev 10018)
+++ trunk/mapbender/tools/mod_monitorCapabilities_main.php	2018-12-17 13:32:00 UTC (rev 10019)
@@ -57,8 +57,8 @@
 	}
 	else {
 		echo _mb("Specify a user ID or a group ID to monitor.") . "\n\n";
-		echo "php5 <script name> user:<user_id> \n\n";
-		echo "php5 <script name> group:<group_id> \n\n";
+		echo "php <script name> user:<user_id> \n\n";
+		echo "php <script name> group:<group_id> \n\n";
 		die;
 	}
 }
@@ -111,8 +111,8 @@
 else {
 	if ($_SERVER["argc"] > 0) {
 		echo _mb("Specify a user ID or a group ID to monitor.") . "\n\n";
-		echo "php5 <script name> user:<user_id> \n\n";
-		echo "php5 <script name> group:<group_id> \n\n";
+		echo "php <script name> user:<user_id> \n\n";
+		echo "php <script name> group:<group_id> \n\n";
 	}
 	else {
 		echo _mb("Please specify a user ID or a group ID!") . " ";
@@ -138,6 +138,7 @@
 //define service types which should be monitored
 $serviceTypes = array('WMS','WFS');
 //for testing
+
 //$serviceTypes = array('WMS');
 foreach ($serviceTypes as $serviceType) {
 
@@ -161,6 +162,7 @@
 	echo $serviceType." services are requested for availability.$br"; 
 	echo "Capabilities documents are requested and compared to the infos in the service db.$br";
 	$e = new mb_notice("mod_monitorCapabilities_main.php: monitoring for user: ".$userid);
+
 	//new: time user-monitoring cycle must stored in array
 	$time_array[$userid] = strval(time());
 	//wait 2 seconds to give enough time between to different users the time can differ also for one user!
@@ -218,6 +220,7 @@
 		echo "initialize monitoring for user: " . $userid . 
 			" ".$serviceType.": " . $service_id_own[$k] . $br;
 		//$e = new mb_exception("/tools/mod_monitorCapabilities_main.php: ".$serviceType.": ".$service_id_own[$k]);
+
 		switch ($serviceType) {
 			case "WMS":
 				$sql = "INSERT INTO mb_monitor (upload_id, fkey_wms_id, " . 
@@ -331,7 +334,7 @@
 		//$e = new mb_notice("mod_monitorCapabilities_main.php: php call: ".$exec);
 		switch ($serviceType) {
 			case "WMS":
-				$exec = PHP_PATH . "php5 " . dirname(__FILE__) . "/mod_monitorCapabilities_write.php " . 
+				$exec = PHP_PATH . "php " . dirname(__FILE__) . "/mod_monitorCapabilities_write.php " . 
 					$currentFilename ." ".$serviceType." 0 > /dev/null &";
 				/*
 		 		* @security_patch exec done
@@ -341,7 +344,7 @@
 				exec($exec);
 				break;
 			case "WFS":
-				$exec = PHP_PATH . "php5 " . dirname(__FILE__) . "/mod_monitorCapabilities_write.php " . 
+				$exec = PHP_PATH . "php " . dirname(__FILE__) . "/mod_monitorCapabilities_write.php " . 
 					$currentFilename ." ".$serviceType." 0 > /dev/null &";
 				exec($exec);
 				break;
@@ -349,6 +352,7 @@
 	}
 	echo "Monitoring start cycle for user: ".$userid." has ended. " . 
 		"(Altogether: " . count($service_id_own) . " ".$serviceType." monitorings started).$br";
+
     //}
 }
 //set time limit (mapbender.conf)



More information about the Mapbender_commits mailing list