From: lars at erhardsen dot dk Operating system: debian woody PHP version: 4.3.4 PHP Bug Type: Program Execution Bug description: exec does not wait for completion of cmd
Description: ------------ I think, I have a similar problem as #11023 - where exec() does not wait for program completion. The scenary is: Linux 2.4.22, Apache 2.0.48, PHP 4.3.4 on a Pentium 4, 2.4ghz, 512 mb ram The page continues without the 'output' from exec thus leaving an incomplete page. If I press f5/refresh, some times it works, other times it does not work. I have also placed sleeps between commands to ensure it works well, but imho this should not be nescessary - as this "bug" does not appear on a slower machine. My php config: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-gd=/usr/local --with-pdflib=/usr/local --with-mysql --with-config-file-path=/etc/apache2 --with-session --with-zlib-dir=/usr --with-png-dir=/usr/lib --with-freetype-dir=/usr --with-jpeg-dir=/usr --with-tiff-dir=/usr --with-system-regex=yes --enable-debug=no --with-xml --with-imap-ssl=/usr/local/imap-2002d --enable-exif --with-openssl --with-gettext --enable-ftp --enable-sysvsem --enable-sysvshm --enable-calendar --enable-bcmath --enable-sockets --enable-track-vars --with-mcrypt --enable-gd-native-ttf --enable-mbstring --enable-gd-native-ttf My Apache config: ./configure --enable-ssl --enable-rewrite --enable-so --enable-info --enable-suexec --with-suexec-caller=nobody --enable-dav --enable-deflate Reproduce code: --------------- system ( "hostname" ); echo " | "; $a = exec ( "uptime" ); $b = split(',', $a); $c = split('up', $b[0]); $d = split(':', $b[3]); echo $c[1] . " | " . $d[1] . ", " . $b[4] . ", " . $b[5]; Expected result: ---------------- maxmotor | 75 days | 0.00, 0.00, 0.00 Actual result: -------------- Some times, nothing is returned -- Edit bug report at http://bugs.php.net/?id=27201&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27201&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27201&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27201&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27201&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27201&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27201&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27201&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27201&r=support Expected behavior: http://bugs.php.net/fix.php?id=27201&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27201&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27201&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27201&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27201&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27201&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27201&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27201&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27201&r=float