473,396 Members | 1,767 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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?

Jan 2 '07 #1
6 1792
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

Jan 3 '07 #2

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..

Jan 3 '07 #3
Jan


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?

Jan 3 '07 #4
Rik
dm******@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
Jan 3 '07 #5
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

Jan 3 '07 #6
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:
dm******@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
Jan 4 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Andrew DeFaria | last post by:
I'm attempting to put my music collection on the web using PHP and I hit a problem. When I attempt an opendir of a directory that contains a "'" character the opendir fails. Here's the code...
2
by: Alex | last post by:
Greetings all, I'm trying to use the "opendir" command on Win32 in a CGI script. I'm using Apache 2.0.48 for Win32. The "openDir" command works from the CGI script when I try to open a...
1
by: Jocab | last post by:
Just had a look at the Wired.com site and it seems it's completely in XHTML and CSS. I don't understand this snippet of code on their homepage, though: <link rel="stylesheet" type="text/css"...
0
by: Steve Chen | last post by:
Wireless Search with Summarized Results/Web Pages, powered by Google! We just released a wireless search service. The wireless search service takes the results returned by Google and gives key...
4
by: gnah | last post by:
Greetings, I hope my problem is easy to fix, I'm pretty new with php - but I am getting weird results with the opendir() function. It may just be a path problem, but I don't see which variable...
5
by: Markus Pitha | last post by:
Hello, i'm using Gentoo Linux and like to open directories which i got from a text file i read of. I tried to open a directory as i wrote the directory name directly into "opendir()" and it...
45
by: Arno R | last post by:
Hi all, I am about to distribute an A97-runtime app. which will be used on a LAN by approx. 30 users. The network is pretty good, but there are a few managers who have wireless laptops... Of...
7
code green
by: code green | last post by:
I am trying to access files on a different drive but the same server to where the script is running. but I only get the error failed to open dir: Invalid argument in...
6
by: MK | last post by:
I don't use c much but i've done lots of perl, perl/Tk, and shellcode on LINUX. I'm trying to do things with directory trees and i occasionally get back an errno from opendir "No such file or...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.