Code

Replace stream_get_contents() which is not php4 compatible
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 12 Dec 2006 12:00:26 +0000 (12:00 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 12 Dec 2006 12:00:26 +0000 (12:00 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5366 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_systemManagement.inc

index e18dc1a5de908c0480ae8b1c1b7e9393dec9b8cc..11229d536c821f9ee8cff0bf250ca228dcb988b8 100644 (file)
@@ -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
               <pre>";
 
         /* 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 "</pre>";