note 33147 deleted from function.exec by danbrown
| From: | danbrown@php.net | Date: | Sun, 04 Jan 2009 16:33:39 +0000 |
| Subject: | note 33147 deleted from function.exec by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-148816@lists.php.net to get a copy of this message | ||
Note Submitter: hansarnholm at hotmail dot com
----
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... ;)