php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31156 Exec function only works when logged in
Submitted: 2004-12-17 17:47 UTC Modified: 2004-12-18 23:47 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: webmaster at adamscs dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.0.3 OS: Windows Server 2003
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: webmaster at adamscs dot com
New email:
PHP Version: OS:

 

 [2004-12-17 17:47 UTC] webmaster at adamscs dot com
Description:
------------
I am using Windows Server 2003 running IIS 6 with PHP 5.0.3.3 CGI.  I am coding a program that require the exec of the "dsmod" command.  The command will only work when the user that it is being exec as is logged in.

Reproduce code:
---------------
<?php
exec ('dsmod user "'.$username.'" -pwd .$password, $dsmod);
echo ($dsmod[0]);
?>

Expected result:
----------------
exec() to work

Actual result:
--------------
exec() only works when the user that is logged into the webpage is also logged into the computer

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-17 23:35 UTC] webmaste at adamscs dot com
Some more info:  I regularly use the exec() funtion with other AD related programs (ldifde, csvde) and they don't have this problem.
 [2004-12-18 12:48 UTC] edink@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. 

Thank you for your interest in PHP.

The fact that you can execute other commands clearly indicates that this is not a PHP issue.
 [2004-12-18 18:32 UTC] webmaster at adamscs dot com
Just because exec() works most of the time, and under certain cases it does not, would imply a bug.  It is not a usage error; the very simple code I posted will simply not work.  

It is my belief that PHP is not properly executing the .exe so as to cause the .exe not to function.  Though it does work "most" of the time, most bugs in major software are intermittent and found in rare circumstances.
 [2004-12-18 23:47 UTC] derick@php.net
Edin is right. You need to check all the permissions to the executable and files that it uses. This is definitely not a PHP problem.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 08 10:01:33 2025 UTC