php.net |  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
Votes:3
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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
Description:
------------
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).



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-06 01:54 UTC] sniper@php.net
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
No,
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

Regards,
 [2004-07-11 20:21 UTC] sniper@php.net
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. 
Regards,
Stephan
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 23:01:28 2024 UTC