IIS7 PHP access is denied errorRSS

2 replies

Last post Dec 03, 2012 12:18 PM by 112233

  • IIS7 PHP access is denied error

    Nov 30, 2012 02:52 PM|112233|LINK

    Hello,

    We just upgrade our webserver and we encountered some issue when using PHP system() to run a program in network drive.

    Here are some information:
    OLD server setting:
    IIS6
    PHP 5.3.1
    WindowsXP

    New Server:
    IIS7
    PHP 5.4
    Windows Server 2008

    Server and file structure:
    2 servers:
    Webserver: where the PHP files are located
    Fileserver: is mapped as S drive in Webserver

    In Webserver
    c:/inetpub/wwwroot/vi/testrun.php:  call the wotx.lnk
    c:/inetpub/wwwroot/vi/wotx.lnk:  a short cut to pvxwin32.exe in fileserver

    Filesever:
    Fileserver/MAS90/Home/pvxwin32.exe

    test.php:
    <?php
    system('C:\Inetpub\wwwroot\vi\wotx.lnk 2>&1');
    ?>

    wotx.lnk:
    S:\MAS90\Home\pvxwin32.exe ..\LAUNCHER\SOTA.INI ..\SOA\STARTUP.M4P -ARG DIRECT UIOFF *** *** *** *** AUTO

    The same code was working perfect in the old server.
    But when we moved to the new server, I run test.php from browser, PHP system() gives me "access Denied" error.
    But if I run the php file in command line in webserver, it works fine.
    I think it might be permission issue.

    Here are some configuration in webserver:
    Default Application Pool --> Identity  is set to Mydomain\web-server
    web-server is a domain account, not a local account

    Permission setting for wotx.lnk:
    web-server@Mydomain.local    full control

    Permission setting for pvxwin32.exe in fileserver:
    web-server@Mydomain.local    full control

    I have been working on this for several days and couldnot figure out how to fix it.
    Any help will be highly appreciated. Thank you very much.

  • Re: IIS7 PHP access is denied error

    Nov 30, 2012 04:32 PM|owjeff|LINK

    Is impersonation enabled? Is the File Server a Windows box? If so, can you turn on auditing and see what user is executing the call or use procmon.

    Jeff Graves

    OrcsWeb: Managed Windows Hosting Solutions
    "Remarkable Service. Remarkable Support."
  • Re: IIS7 PHP access is denied error

    Dec 03, 2012 12:18 PM|112233|LINK

    Thanks for your help.

    Problem has been solved.

    Solution:

    changed the shortcut, in stead of using the mapped drive name, we changed to use the server name directly.

    Hope it will be helpful for someone.