I am trying to connect to some Windows directories using system(net use...). I works fine on my local machine where I have installed PHP, MySql, Apache... Though, I need to move it to a Windows 8 Server using WAMP. When I try running the script from there it's like it doesn't recognize the system() call and I get the following error:
Warning: opendir(V:/today/,V:/today/) [<a href='function.opendir'>function.opendir</a>]: The system cannot find the path specified. (code: 3) in C:\workspace\www\cameracatcher\camera.php on line 205
Here is my actual call:
$testWH = array(2 => array('WH' => 'ST. Louis', 'IP' => '100.100.2.200', 'DRIVE' => 'V'),
3 => array('WH' => 'Visalia', 'IP' => '100.100.3.200', 'DRIVE' => 'U')
);
$camCheck = array();
$doCamCheck = array();
$imgs = array();
$deadCamCheck = array();
$docheck = array();
$countArray = 0;
$countImgs = 0;
//------------------------
//loop through warehouse to check
//------------------------
foreach($testWH as $w=>$h){
//------------------------
//Map the drive
//------------------------
system('net use '.$h['DRIVE'].': \\\\'.$h['IP'].'\\'.$folder.'\ '.$pass.' /user:'.$user.'/persistent:no');
//------------------------
//call func to read thru dir's
//------------------------
$doCamCheck = openMyDir($h['DRIVE'].":/today/", $camCheck, $imgs);
.
.
.
I've tried going into services.msc and changed the Apache user to an admin user instead of the local login user. I also set safe_mode_exec_dir = OFF.
Could this be an issue b/c I am on Windows Server 8 or something w/ the WAMP install?
I appreciate any feedback.