Re: PHP, C++, and LAN
| From: | Keith Jeffery | Date: | Sat, 04 Aug 2001 04:16:16 +0000 |
| Subject: | Re: PHP, C++, and LAN | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-61218@lists.php.net to get a copy of this message | ||
Sadly, after many days of alternative development for this problem, it seems
that my problem is with my Apace setup, and not my scripts at all. I'm sill
not sure if PHP will do this, because after giving up I rewrote the program
in Perl. After I encountered the exact same problem with Perl, it finally
dawned on me that it might be Apache. Not knowing how to configure Apache
properly, I tried the Perl script out on an IIS installation, where it works
fine. Why I'm here, anybody know how to configure Apache to do this? I
can't find the problem.
Thanks,
Keith Jeffery
jeff2619@uidaho.edu
"Keith Jeffery" <jeff2619@uidaho.edu> wrote in message
news:20010801143214.28955.qmail@pb1.pair.com...
> Hello,
> I'm writing some PHP scripts that will only be used over our local
> Windows NT/2000 network. I've written a directory browser in PHP, but
that
> only sees the server's local directories/files whereas I would also like
to
> be able to see shared network directories. Since the PHP directory
> functions don't allow network connections (i.e. //harp/graphics/) I
decided
> that a good workaround would be to write a C++ program that listed the
> directories and files (like dir or ls if you're on Unix, and I can't get
dir
> to work through a PHP exec command), and then I would parse the output in
> PHP. I've since written two different C++ programs to do this, one using
> findfirst and findnext, and other using opendir and readdir. They both
work
> by specifying the directory to be listed after the program (i.e.
> "listFiles.exe d:/" or "listFiles.exe //harp/graphics/"). Both of these
> programs work just as expected from the command prompt, working with both
> directories local to the server and those on a shared network drive.
> However, both of these programs fail using any PHP system command (exec,
> passthru, system) when specifying a network drive as the arguement,
although
> both work when a server's local directory is given. For some reason it
can
> no longer read the network drive when run through PHP. I've double and
> triple checked the arguements passed, and they command issused is exactly
> that given at the command prompt. I've even tried changing the current
> working directory in the C++ program and to no avail. Does anybody have
any
> insight, or perhaps another route down which to travel? I will happily
> provide PHP and/or C++ code for what I'm doing.
>
> Thank you,
> Keith Jeffery
> jeff2619@uidaho.edu
>
>