Menu

#88 Scan Subnet with Microsoft IIS

version 0.8
closed
nobody
1
2016-02-02
2014-05-20
Jambonrange
No

Hi !

I installed IPAM on IIS for Win2008 R2 but the scan subnet doesn't work.
I get the following error:

"Error executing scan! Error code - 255 - cmd : e:\WebSites\phpExecutables\php.exe E:\WebSites\IPAM\site\ipaddr\scan......\functions\scan\scanIPAddressesScript.php 'discovery' '10.1.1.0/24' '10'"

I try to change the:

$pathPing = $settings['scanPingPath'];

to:

$pathPing = "C:\Windows\System32\PING.EXE";

Here, the retval was 1000 and now it is 1.

and also the "functions-network.php" file for the pingHost function:
for the "if" corresponding to the WIN option:

$cmd = "$pathPing -n $count -I ".($timeout*1000)." $ip 1>null 2>&1";

to:

$cmd = "$pathPing -n $count -w ".($timeout*1000)." $ip 1>NUL 2>&1";

Here, the retval stays 1 for an existing host or not.

I was wondering if the return code for the windows ping isn't the same as the linux ping.
So I tried to ping a host and then check the retval (echo $?), the result is true or false:
screenshot

Do you have an idea to make it work ?

Thank you !

Discussion

  • Anonymous

    Anonymous - 2015-03-26

    I have the same error. Any fix?

     
  • Anonymous

    Anonymous - 2015-03-26

    I have thise problem on FreeBSD

     
    • Miha Petkovsek

      Miha Petkovsek - 2015-03-26

      For freebsd you have to change permissions on ping executable file. I run it on 2 servers without problems.

       
  • Anonymous

    Anonymous - 2015-03-26

    version 1.1 have same problem too

     
  • Miha Petkovsek

    Miha Petkovsek - 2015-03-26

    There was one thread where removing the timeout helped on windows.

    Retval 1000 means ping file is not found.

    Regarding return - this is possible that 1 is true and 0 false. Maybe try adding below lines to pingHost function:

    //win true/false test
    if(is_bool($retval)) { $retval = $retval===false ? 2 : 0; }
    

    brm

     
  • Anonymous

    Anonymous - 2015-06-23

    The Ping Scan Problem is here again in version 1.16 rev 006. Any fixes?

     
  • Miha Petkovsek

    Miha Petkovsek - 2016-02-02
    • Status: open --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.