php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34619 ISAPI module does not use exec/system functions correctly
Submitted: 2005-09-23 19:31 UTC Modified: 2005-09-23 19:59 UTC
From: ootoaoo at gmail dot com Assigned:
Status: Not a bug Package: IIS related
PHP Version: 5.0.5 OS: Windows 2003
Private report: No CVE-ID: None
 [2005-09-23 19:31 UTC] ootoaoo at gmail dot com
Description:
------------
Use IIS 6 with an ISAPI module and exec and system will never actually call the application to run.

http://geesu.net/gallery2/phpinfo.php (if you want to check settings)

If I use the CGI binary it works perfectly fine.  Note: All other PHP things have worked fine with the ISAPI module, I only found exec and system to be broken in my tests.

BUT, if the file you want to execute is in windows/system32, the program will execute and you will receive a result, otherwise you will not.

Also safe_mode is off, so it's not restricting the directory.

Reproduce code:
---------------
	// This will NOT work (assuming netstat.exe is copied to c:\tools\
	$command = "c:\\tools\\netstat.exe";
	echo system($command);

	// This will work as its in system32
	$command = "netstat";
	echo system($command);
	
	// This also works
	$command = "c:\\windows\\system32\\netstat.exe";
	echo system($command);


Expected result:
----------------
I expect to see the netstat result on ALL 3

Actual result:
--------------
The first echo returns nothing, the last 2 return results

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-23 19:59 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 21 23:01:31 2024 UTC