PHP 4.0 Bug #8077: Exec, passthru, system bugs for php ISAPI & CGI

From: Date: Sat, 02 Dec 2000 14:23:30 +0000
Subject: PHP 4.0 Bug #8077: Exec, passthru, system bugs for php ISAPI & CGI
Groups: php.dev 
Request: Send a blank email to php-dev+get-39844@lists.php.net to get a copy of this message
From: lexzeus@altavista.com Operating system: Win 98 PHP version: 4.0.1pl2 PHP Bug Type: Program Execution Bug description: Exec, passthru, system bugs for php ISAPI & CGI I have been playing with php for quite long, and have many chances answering people question in www.experts-exchange.com But, this is a question that noone can answer yet : When you install PHP4 in Win98 (I install both in Apache for Win and PWS, and some has similar problem in IIS) : file : try.php <? system("dir/w > c:\\dir.txt"); print join("",file("c:\\dir.txt"); ?> The execution of system() runs ok, but the 2'nd statement is never executed (the browser simply hang). But if I do : C:\>php try.php it runs ok !! When I do exec() or system() or variant of it, PHP always open a new window (DOS) to perform the task, but then it failed to kill that process (or failed to return the handler to web server itself)... If this is a really bug, then Zend must consider this is a serious bug since many people have asked "how to delete a file in Win/PWS - NT/IIS" simply because they can't do unlink() and using exec() always fail ... Oh ya, you may also notice if() statement : if ($x=1 && $myname="alex" || $x=2) print "$x $myname"; it will print "1 1" ?? whereas in Perl (and other prog language) should print "1 alex" ... it may cause bug if someone write : function f1() {if (???) return 1; else return "a";} function f2() {if (???) return 2; else return "b";} function f3() {if (???) return 3; else return "c";} if ($x=f1() || $x=f2() || $x=f3()) print "function(s) debug value : $x"; It will do wrongly ... rgds, Alexander Yanuar Koentjara System Developer www.globalsources.com -- Edit Bug report at: http://bugs.php.net/?id=8077&edit=1

« previous php.dev (#39844) next »