note 33147 added to function.exec

From: Date: Tue, 17 Jun 2003 17:00:30 +0000
Subject: note 33147 added to function.exec
Groups: php.notes 
Request: Send a blank email to php-notes+get-50521@lists.php.net to get a copy of this message
After searching the web for some time, I finally found out why I was getting those Unable to pork warnings. I try and still use the "exec("cmd /c [command]", $array);" but in Windows XP using this command is not enough. You have to enable the IUSR_xxx user to read both cmd.exe and the file you want to execute. Where xxx is replaced by your computername. Since Simple File Sharing by default is enabled in WindowsXP you cannot give the IUSR_xxx user access to cmd.exe without doing it in a dos-command-promt. So open up cmd.exe: Start -> Run -> cmd use the calcs command to edit the access rights for the files. e.g. C:\WINDOWS\system32>cacls cmd.exe /E /G CYPRES\IUSR_CYPRES:R since CYPRES is my computername, this is the name I will use. When you do the command replace CYPRES with your computer name. And thats it. Sorry for the long note, but I thought others might find it usefull... ;) ---- Manual Page -- http://www.php.net/manual/en/function.exec.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33147 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33147&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33147&report=yes

« previous php.notes (#50521) next »