From d59800c1cb10d2d61ac402e4e4e5253a19810a02 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 12 Dec 2006 12:00:26 +0000 Subject: [PATCH] Replace stream_get_contents() which is not php4 compatible git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5366 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_systemManagement.inc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc index e18dc1a5d..11229d536 100644 --- a/plugins/admin/systems/class_systemManagement.inc +++ b/plugins/admin/systems/class_systemManagement.inc @@ -248,7 +248,6 @@ class systems extends plugin /* Get and check command */ $command= search_config($this->config->data['TABS'], "workgeneric", "ISOCMD"); -// $command = "/bin/sh /home/hickert/gen_stuff.sh"; if (check_command($command)){ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execute"); @@ -265,7 +264,7 @@ class systems extends plugin
";
 
         /* Open process handle and check if it is a valid process */
-        $process= proc_open($command, $dsc, $pipes, '/tmp');
+        $process= proc_open($command, $dsc, $pipes);
         if (is_resource($process)) {
           fclose($pipes[0]);
 
@@ -279,7 +278,11 @@ class systems extends plugin
         }
     
         /* Get error string && close streams */
-        $buffer= stream_get_contents($pipes[2]);
+        $buffer = "";
+        while (!feof($pipes[2])){
+          $buffer .= fgets($pipes[2],256);
+        }
+      
         fclose($pipes[1]);
         fclose($pipes[2]);
         echo "
"; -- 2.30.2