|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29001 "unable to fork"
Submitted: 2004-07-03 18:47 UTC Modified: 2004-07-12 09:39 UTC
Avg. Score:3.0 ± 1.4
Reproduced:2 of 3 (66.7%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: hartz at e-consult-ag dot de Assigned:
Status: Not a bug Package: IIS related
PHP Version: 4.3.7 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: hartz at e-consult-ag dot de
New email:
PHP Version: OS:


 [2004-07-03 18:47 UTC] hartz at e-consult-ag dot de
If i exec the follow code 

$lbRet = exec("\\bin\\zip.exe /zipfolder",$laOutput,$liRet);
over a webinterface (Windows XP, IIS 5.0, PHP-ISAPI-Module)
i get an error like "unable to fork ...".

After reading the php-documentation and bug-database i tried to exec the following code with the same result:
$lbReturn = exec("cmd /c ..\\bin\\zip.exe tmp/zipfolder",$laOutput,$liReturn);

The IUSR_ has the correct rights for executing and reading the both files (cmd and zip).


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-06 01:54 UTC]
Does this happen with some other webserver, like Apache?
(or if you run PHP as CGI binary)

 [2004-07-06 10:15 UTC] hartz at e-consult-ag dot de
it happens only under iis 5.0. Under apache and windows 2000 it runs without any problems.
 [2004-07-06 10:17 UTC] hartz at e-consult-ag dot de
I tried it by running PHP as CGI binary with the same result
 [2004-07-09 15:32 UTC] egarcia at egm dot as
This is not a problem in the PHP.
The problem is related to the execution permissions over the CMD to the IUSR_machine and the ZIP exe file.

I do fork to GPG.exe in ISAPI/CGI modes. Using popen and proc_open.

According to the mode ISAPI/CGI the IWAM_/IUSR_ user must have read & execute permissions over the CMD and the EXE file that you try to call.

This sentence put the needed permissions:

cacls cmd.exe /E /G MACHINE\IUSR_MACHINE:R

 [2004-07-11 20:21 UTC]
Not PHP bug (see above comment)

 [2004-07-12 09:39 UTC] hartz at e-consult-ag dot de
This sentence is from an older thread here in this bug-database. I've read this thread and executed this command for the cmd.exe and the zip.exe file bevore i wrote this bugreport. 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 25 05:01:32 2024 UTC