FAQ
ID: 41926
Updated by: sniper@php.net
Reported By: fskbcb at puk dot ac dot za
-Status: Open
+Status: Bogus
Bug Type: Network related
Operating System: Windows XP
PHP Version: 5.2.3
New Comment:

Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:
------------------------------------------------------------------------

[2007-07-08 18:43:45] fskbcb at puk dot ac dot za

Description:
------------
I am unable to access a shared directory on another windows pc by
executing the windows "dir \\remoteserver\sharedir" function in php.

I have tried this using exec(),system() etc.

When I type the command "dir \\remoteserver\sharedir" on the windows
command line (cmd) it works fine. If I do a "dir \\ownserver\sharedir"
of the shares of the pc that I am working on, I am able to view them. It
seems that when php executes the command to read another pc's shares,
there may be permission problems?

Reproduce code:
---------------
<?php
/* Please change server name and directory name to
relevant windows share */
$server_name="radio";
$server_name="radio";
$directory_name="photos";
$share="\\\\".$server_name."\\".$directory_name;

$cmd=array(
"net use ".$share,
"dir ".$share);

for ($x=0;$x < count($cmd);$x++) {

echo "Command: ".$cmd[$x]." <br>";
$result = `$cmd[$x]`;
echo "The result is: <br>".$result." <br>";

}

?>

Expected result:
----------------
Command: net use \\radio\photos
The result is:
Local name Remote name \\radio\photos Resource type Disk Status OK #
Opens 0 # Connections 1 The command completed successfully.
Command: dir \\radio\photos
The result is:


Actual result:
--------------
Command: net use \\radio\photos
The result is:
Local name Remote name \\radio\photos Resource type Disk Status OK #
Opens 0 # Connections 1 The command completed successfully.
Command: dir \\radio\photos
The result is:
Volume in drive \\radio\photos is Spare Volume Serial Number is
4C41-9557 Directory of \\radio\photos 05/07/2007 06:13 PM <DIR>
. 05/07/2007 06:13 PM <DIR> ..

etc . . . . .


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=41926&edit=1

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
groupphp-bugs @
categoriesphp
postedJul 8, '07 at 6:43p
activeJul 8, '07 at 6:58p
posts2
users2
websitephp.net

People

Translate

site design / logo © 2018 Grokbase