views:

38

answers:

1

Hey guys I have one php exec command that works on my remote linux server but not my windows (WAMP package) local server. I really want to create an identical workstation so I can test locally and then update my remote server. If anyone has any suggestions or solutions other than converting to linux, I would really appreciate it.

<?php

$safe_path = escapeshellarg('fake-virus.txt');

$command = '/usr/bin/clamscan --stdout ' . $safe_path;

$out = '';

$int = -1;

exec($command, $out, $int);



echo $int;



if ($int == 0) {

    // all good;

} else {

    echo 'o no';// VIRUS!;

}





?>
+2  A: 

I really want to create an identical workstation so I can test locally and then update my remote server

Installing cygwin is the wrong way to go about this. Just use virtualbox, which you can get from here, and run an Ubuntu VM. Much easier (and nicer).

John Feminella
sounds like a good idea, will I have to use xampp server lol? It has been giving my trouble with PDO.
Scarface
Use whatever server you want. Apache is typically the most common choice, though.
John Feminella
thanks john appreciate it
Scarface