opendir issues Wired vs Wireless

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dmcglynn@gmail.com

    opendir issues Wired vs Wireless

    Hello all..

    I have a strange issue. I am trying to do an opendir via a UNC path,
    from my windows server to another windows machine.

    As long as my remote machine is on a physically wired connection, it
    works great. However, if my remote machine is on a wireless network, I
    get the following error:

    Warning: opendir(\\10.51 .50.79\plc$): failed to open dir: Invalid
    argument

    Trying hostnames instead of using IPs doesn't seem to matter, however
    simply plugging into a wired network fixes it every time..

    Anyone else had a problem similar to this?

  • Toby Inkster

    #2
    Re: opendir issues Wired vs Wireless

    dmcglynn wrote:
    As long as my remote machine is on a physically wired connection, it
    works great. However, if my remote machine is on a wireless network, I
    get the following error:
    Might be a stupid question, but is the IP address of the remote machine
    the same in each case?

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact

    Comment

    • dmcglynn@gmail.com

      #3
      Re: opendir issues Wired vs Wireless


      Toby Inkster wrote:
      dmcglynn wrote:
      >
      As long as my remote machine is on a physically wired connection, it
      works great. However, if my remote machine is on a wireless network, I
      get the following error:
      >
      Might be a stupid question, but is the IP address of the remote machine
      the same in each case?
      >
      --
      Toby A Inkster BSc (Hons) ARCS
      Contact Me ~ http://tobyinkster.co.uk/contact
      In each case, I am setting it to the same static IP, yes.

      I don't understand how PHP could possibly see a difference in the
      network media.. Is there some fine-tuning on my access-point that could
      fix this? It is completely confusing..

      Comment

      • Jan

        #4
        Re: opendir issues Wired vs Wireless



        On 2 jan, 22:46, dmcgl...@gmail. com wrote:
        Hello all..
        >
        I have a strange issue. I am trying to do an opendir via a UNC path,
        from my windows server to another windows machine.
        >
        As long as my remote machine is on a physically wired connection, it
        works great. However, if my remote machine is on a wireless network, I
        get the following error:
        >
        Warning: opendir(\\10.51 .50.79\plc$): failed to open dir: Invalid
        argument
        >
        Trying hostnames instead of using IPs doesn't seem to matter, however
        simply plugging into a wired network fixes it every time..
        >
        Anyone else had a problem similar to this?
        Could it just be a bad wireless connection? Did you check with eg
        Netstumbler?

        Comment

        • Rik

          #5
          Re: opendir issues Wired vs Wireless

          dmcglynn@gmail. com wrote:
          Toby Inkster wrote:
          >dmcglynn wrote:
          >>
          >>As long as my remote machine is on a physically wired connection, it
          >>works great. However, if my remote machine is on a wireless
          >>network, I get the following error:
          >>
          >Might be a stupid question, but is the IP address of the remote
          >machine the same in each case?
          >>
          >--
          >Toby A Inkster BSc (Hons) ARCS
          >Contact Me ~ http://tobyinkster.co.uk/contact
          >
          In each case, I am setting it to the same static IP, yes.
          >
          I don't understand how PHP could possibly see a difference in the
          network media.. Is there some fine-tuning on my access-point that
          could fix this? It is completely confusing..
          Well, a simple googling will give you lots of problems with network shares
          and a wireless network. Most importantly: can you get to the share manually
          when you're wireless? I suspect it might be more of an
          firewall/access-point/ports problem...
          --
          Rik Wasmus


          Comment

          • Toby Inkster

            #6
            Re: opendir issues Wired vs Wireless

            dmcglynn wrote:
            In each case, I am setting it to the same static IP, yes.
            >
            I don't understand how PHP could possibly see a difference in the
            network media.. Is there some fine-tuning on my access-point that could
            fix this? It is completely confusing..
            It could be that the wireless dongle device falls asleep after a period
            of non-use. Have you tried something like...

            if (!($handle = @opendir($dir)) )
            {
            sleep 2;
            if (!($handle = @opendir($dir)) )
            {
            sleep 3;
            $handle = opendir($dir);
            }
            }
            /* do stuff */

            --
            Toby A Inkster BSc (Hons) ARCS
            Contact Me ~ http://tobyinkster.co.uk/contact

            Comment

            • dmcglynn@gmail.com

              #7
              Re: opendir issues Wired vs Wireless

              Why didn't I think to test this first, before posting to the PHP
              newsgroup...

              Ugh. It does not work when attempting to connect to it via
              "\\192.168.1.2\ sharename" under START RUN..

              So windows is refusing it for some reason, not PHP.. I apologize, and
              apparently need to look elsewhere for the problem..

              Thanks,
              -Dave


              Rik wrote:
              dmcglynn@gmail. com wrote:
              Toby Inkster wrote:
              dmcglynn wrote:
              >
              >As long as my remote machine is on a physically wired connection, it
              >works great. However, if my remote machine is on a wireless
              >network, I get the following error:
              >
              Might be a stupid question, but is the IP address of the remote
              machine the same in each case?
              >
              --
              Toby A Inkster BSc (Hons) ARCS
              Contact Me ~ http://tobyinkster.co.uk/contact
              In each case, I am setting it to the same static IP, yes.

              I don't understand how PHP could possibly see a difference in the
              network media.. Is there some fine-tuning on my access-point that
              could fix this? It is completely confusing..
              >
              Well, a simple googling will give you lots of problems with network shares
              and a wireless network. Most importantly: can you get to the share manually
              when you're wireless? I suspect it might be more of an
              firewall/access-point/ports problem...
              --
              Rik Wasmus

              Comment

              Working...