php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8077 Exec, passthru, system bugs for php ISAPI & CGI
Submitted: 2000-12-02 09:23 UTC Modified: 2001-04-27 18:54 UTC
From: lexzeus at altavista dot com Assigned:
Status: Closed Package: Program Execution
PHP Version: 4.0.1pl2 OS: Win 98
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lexzeus at altavista dot com
New email:
PHP Version: OS:

 

 [2000-12-02 09:23 UTC] lexzeus at altavista dot 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-16 06:25 UTC] jmoore@php.net
Duplicate of 4761
 [2001-04-27 18:54 UTC] sniper@php.net
Fixed in CVS. Wait for PHP 4.0.6


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Nov 12 20:01:30 2024 UTC