|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
PHP accessing IIS access denied
Hey...
I'm am developing a intranet that uses PHP to set up an virtual directory for anybody that wants one. This script fails to execute everytime... In php I use a system() call to call a batch file. (The batch file works locally when it is ran.) This is part of the output: c:\Inetpub\wwwroot\PublicScripts>cscript.exe c:\inetpub\adminscripts\adsutil.vbs create w3svc/1/root/USER "IIsWebVirtualDir" -s:blackbox Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. Permission denied ErrNumber: 70 (0x46) Error accessing the object: w3svc/1/root/USER ... (Following commands have the same error.) Obviously I'm not providing the proper credentials... and I can't use the runas command either, since it's a web interface. Any ideas of how to fix this... and yes, I've already googled this. |
|
#2
|
|||
|
|||
|
Right, I take it that PHP works most of the time? i.e you can make a phpinfo() call?
The next step is to allow access to the batch file, you probably have access to run it locally either under administrator privledges or system.. however, the user running the script (my guess IUSER_ServerName) doesn't have executable rights on that file? (Right click » Properties » Security Tab) |
|
#3
|
|||
|
|||
|
Yeah, that's what I thought too... but I enabled the IUSR_NAME to be full administrator just for debugging purposes. I also did enable proper security rights for the batch file... I'm wondering if I have to do something with php to make it work... Haven't found the solution yet though...
|
|
#4
|
|||
|
|||
|
Doesn't sound like a php problem.. do the executables called in the batch file have the same privledges by IUSER? Also what version of IIS are u using, IIS5 or 6?
|
![]() |
| Viewing: Dev Shed Forums > System Administration > IIS > PHP accessing IIS access denied |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|