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.