note 74659 deleted from function.exec by cmb
| From: | cmb@php.net | Date: | Mon, 21 Nov 2016 19:20:11 +0000 |
| Subject: | note 74659 deleted from function.exec by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-207290@lists.php.net to get a copy of this message | ||
Note Submitter: Zack / Nog
----
Hey guys, I just wanted to drop a note after spending , i dunno 6 hours or so on getting exec() to
work on an outside program with Win2k3 on IIS6 and PHP installed as an ISAPI module. I originally
had it installed with Ensim, but it got confusing, so after a while of it not working I installed
the latest PHP 5 binaries.
First thing I did was download the latest PHP 5 Binaries for Windows, but NOT THE INSTALLER. I dunno
what the installer does, but I read previously not to use it, so I set it up like that.
After that I went into IIS manager, clicked on Add Extensions, added .PHP and changed the executing
location to c:\php\php5isapi.dll. Then I went into the website portion, right clicked on it, went to
properties, clicked on the Home site tab, clicked Configure and added an extension with extention =
.php and executable = c:\php\php5isapi.dll.
After this , the thing that FINALLY WORKED! was , well, see at first I setup permissions by adding
IUSR_MyCompName to the allowed list, and checked Full control, so i thought it had permissions....
Well, it was being overwritten which is what bit me...
I went into the C: drive, and right clicked and went to Properties, clicked on the Security tab, and
then clicked on Advanced in the bottom right. If you see any IUSR with Deny, simply remove it.
Then right click on c:\php and do the same, after all Deny's have been deleted (Which override
allows, which was my issue), go into c:\php and open the security tab, make sure IUSR_yourcompname
is added as allow, and then do the same for c:\yoursoftwarefolder\ so your software has the same
permissions.
The deny thing on C: overriding my c:\folder with allow was blowing it all up for me, I deleted the
deny and made sure IUSR_mycompname was with full control on my outside apps file, and VUALA !!!
Theres now some trouble with it asking for a confirmation, but i'll figure that out later, i
can at least run it without troubles :)
ALSO! DO NOT FORGET! Add C:\php and C:\outsidesoftwarefolder as Environment Variables to the Path
variable in your system. It's easy, just right click my comp, properties, click advanced tab,
enviornment variable button at the bottom, in the second scrolling list find the one with name of
lowercase path, double click it, and on the end, add a semi-colon to end the last folder and type
your folder location
so if it was originally c:\test;c:\windows\system32 and you wanna add php, make it read
c:\test;c:\windows\system32;c:\php
Hope this helps someone , the thing that helped the most was the Advanced button in the security tab
and removing the denies, which take ownership OVER the allows.
... My 2 cents :)