Re: php help


Subject: Re: php help
From: Brian ThunderEagle (furbs@mail.swjedi.net)
Date: Sun Nov 10 2002 - 22:20:43 AKST


> $exe="$smb_client \"\\\\\\\\$smb_server\\$smb_share\" $password -U
> $username -D $smb_dir -c 'dir $smb_file ;'";

   This should decipher literally into the following:
\\\\$smb_server\$smb_share" $password -U $username -D $smb_dir -c 'dir
$smb_file;'

   I would suggest trying this line instead:
$exe="$smb_client \"\\\\$smb_server\\$smb_share\" $password -U $username -D
$smb_dir -c 'dir $smb_file ;'";

   which would create:
\\$smb_server\$smb_share" $password -U $username -D $smb_dir -c 'dir $smb_file;'

   If you are trying to make the following:
//$smb_server/$smb_share" $password -U $username -D $smb_dir -c 'dir $smb_file;'

   then from what I recall you should be able to just use:
$exe="$smb_client \"//$smb_server/$smb_share\" $password -U $username -D
$smb_dir -c 'dir $smb_file ;'";

   However if that doesn't create the commend properly you may need to do this:
$exe="$smb_client \"\/\/$smb_server\/$smb_share\" $password -U $username -D
$smb_dir -c 'dir $smb_file ;'";

I hope that wasn't too confusing, and that it fixes your problem. However it
would be good to know what the error is, if it is the command itself or if its
just producing a PHP syntaxerror.

     Brian ThunderEagle
     - http://www.swjedi.net
     - furbs@swjedi.net
     - bthundereagle@aidea.org

Quoting Chris Hamilton <chris@digitalalaska.com>:

>
> Hi all, I've got a line of php I was hoping someone could help me decipher.
> I'm trying to get the smbclient running on a squirrelmail setup. I'm still
> getting errors that point to a particular line of code...
>
> $exe="$smb_client \"\\\\\\\\$smb_server\\$smb_share\" $password -U
> $username -D $smb_dir -c 'dir $smb_file ;'";
>
> Does this line actually create a command that looks like...
>
> smbclient //servername/sharename password -U chris ...
>
> I'm certainly no expert but it looks like it would create a command that
> looks like
>
> smbclient \\servername\sharename password -U chris...
>
> The second command won't work, so my question is can I simply replace the
> slashes?
>
> Thanks.
>
> Chris.
>
>
>
> ---------
> To unsubscribe, send email to <aklug-request@aklug.org>
> with 'unsubscribe' in the message body.
>

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Sun Nov 10 2002 - 22:12:51 AKST