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

From: Date: Mon, 16 Apr 2001 10:25:05 +0000
Subject: Bug #8077 Updated: Exec, passthru, system bugs for php ISAPI & CGI
Groups: php.dev 
Request: Send a blank email to php-dev+get-51667@lists.php.net to get a copy of this message
ID: 8077 Updated by: jmoore Reported By: lexzeus@altavista.com Old-Status: Open Status: Duplicate Bug Type: Program Execution PHP Version: 4.0.1pl2 Assigned To: Comments: Duplicate of 4761 Previous Comments: --------------------------------------------------------------------------- [2000-12-02 09:23:30] lexzeus@altavista.com 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 --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=8077&edit=2

« previous php.dev (#51667) next »