Re: html output done without result of exec_shell

From: Date: Thu, 28 Feb 2002 12:13:24 +0000
Subject: Re: html output done without result of exec_shell
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-86586@lists.php.net to get a copy of this message
On Thursday 28 February 2002 19:09, Gunther E. Biernat wrote: > Guys, > > I'm trying to output the result of a shell command within a page. Problem > is, when it's a command with short execution time like echo shell_exec("ls > -la"); > it works fine, but the command I'm really trying to execute takes 2-3 > seconds before having calculated the response and by then, the page is > already done and the output of the command isn't included. > > I played around with the settings in php.ini, but none of them changed the > problem. Maybe an Apache problem? > > What am I missing? The shell_exec() function *waits* for the output from the command. I tried: echo shell_exec("find / -name *.doc"); which takes nearly 2 minutes to complete and I still got the complete output. Are you sure your command returns some output? Have you tried it within a real shell? -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* Desist from enumerating your fowl prior to their emergence from the shell. */

« previous php.general (#86586) next »