Re: no traffic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mar 6, 2012, at 8:55, Lawrence Decker <lld0227@xxxxxxxxx> wrote:

> I've been playing with PHP for about 6 years and I have no idea why this is
> happening... I've been writing a script to auth to AD.  When I run the
> script on my dev box, nothing.  I have wireshark running in the background
> on the dev box, I can see the script's traffic go out and hit the DNS
> server but no other traffic. Command line, no problem talking to other
> hosts with whatever port I'm trying to hit.  On my box, all the scripts
> work fine.  LDAP is enabled, but I can't hit ANY port other than DNS and if
> I use the IP in the script, I see no traffic.  Both are FC16-64 patched as
> of last week. I matched line-by-line in the phpinfo() on my box and the dev
> box - no difference.  Used this script to try any port open on other hosts
> but no traffic shows up in wireshark!! Any ideas????
> 
> 
> Lawrence
> 
> 
> 
> <?php
> function ping($host,$post=25,$timeout=6)
> 
> {
>  $fsock = fsockopen($host, $port, $errno, $errstr, $timeout);
>  if ( ! $fsock )
>  {
>   return FALSE;
>  }
>  else
>  {
>   return TRUE;
>  }
> }
> 
> /* check if the host is up $host can also be an ip address */
> $host = 'mail.bac.com';
> $up = ping($host);
> 
> /* optionally display either a red or green image to signify the server
> status */
> echo '<img src="'.($up ? 'on' : 'off').'.jpg" alt="'.($up ? 'up' :
> 'down').'" />';
> 
> ?>
> 
> 
> or this one
> 
> 
> 
> <?php
> 
> //using ldap bind anonymously
> 
> // connect to ldap server
> $ldapconn = ldap_connect("10.13.3.10")
>    or die("Could not connect to LDAP server.");
> 
> if ($ldapconn) {
> 
>    // binding anonymously
>    $ldapbind = ldap_bind($ldapconn);
> 
>    if ($ldapbind) {
>        echo "LDAP bind anonymous successful...";
>    } else {
>        echo "LDAP bind anonymous failed...";
>    }
> 
> }
> 
> ?>
> 
> 
> 
> phpinfo()
> 
> LDAP Support enabled RCS Version $Id: ldap.c 321634 2012-01-01 13:15:04Z
> felipe $ Total Links 0/unlimited API Version 3001 Vendor Name OpenLDAP Vendor
> Version 20426 SASL Support Enabled

How many interfaces are on your box? From the cli can you telnet 10.13.3.10 389

Also do a netstat -na | grep 389

What returns, any open outgoing sockets?

Mike Mackintosh
ZCE PHP5.3
www.highonphp.com
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux