Summary | VFS ssh2 doesnt work correctly |
Queue | Horde Framework Packages |
Queue Version | FRAMEWORK_3 |
Type | Bug |
State | No Feedback |
Priority | 2. Medium |
Owners | |
Requester | holger.wegner (at) hamburg (dot) de |
Created | 09/27/2008 (6122 days ago) |
Due | |
Updated | 10/28/2008 (6091 days ago) |
Assigned | 09/28/2008 (6121 days ago) |
Resolved | 10/23/2008 (6096 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
right, my debian system should take the LC_TIME Variable, as it worked
for me with LC_ALL, its okay. I have to look for a reason why it
doesnt accept LC_TIME.
Thanks for your help.
don't apply LC_TIME correctly. The log you provided is *not* using
LC_TIME=C.
the LC_TIME to LC_ALL and it works now for me.
SHELL=/bin/bash
SSH_CLIENT=127.0.0.1 55615 5622
LC_ALL=de_DE.utf8
USER=holweg
MAIL=/var/mail/holweg
PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
LANG=de_DE.UTF-8
GDM_LANG=de_DE.utf8
SHLVL=1
LANGUAGE=de_DE:de:en_GB:en
and the complete language environment:
LANG=de_DE.UTF-8
LANGUAGE=de_DE:de:en_GB:en
LC_CTYPE="de_DE.utf8"
LC_NUMERIC="de_DE.utf8"
LC_TIME="de_DE.utf8"
LC_COLLATE="de_DE.utf8"
LC_MONETARY="de_DE.utf8"
LC_MESSAGES="de_DE.utf8"
LC_PAPER="de_DE.utf8"
LC_NAME="de_DE.utf8"
LC_ADDRESS="de_DE.utf8"
LC_TELEPHONE="de_DE.utf8"
LC_MEASUREMENT="de_DE.utf8"
LC_IDENTIFICATION="de_DE.utf8"
LC_ALL=de_DE.utf8
New Attachment: test.txt
with your changes. The driver isn't really set up to be unit tested
for this, but maybe we can reorganize it. Can you log the result of
ssh2_exec and upload it, so we can compare?
from ssh2_exec. I changed ssh2.php to write the stream of ssh2_exec
line by line to a file. Here it is.
State ⇒ Feedback
with your changes. The driver isn't really set up to be unit tested
for this, but maybe we can reorganize it. Can you log the result of
ssh2_exec and upload it, so we can compare?
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ VFS ssh2 doesnt work correctly
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
returned the filename was wrong:
"1000 50 112 30. Okt 2004 ldap"
But other names were correct, except that there was an space in front
of the name.
The ones that worked, had an time in the year field.
I looked in the ssh2.php of the VFS and noticed that it was connected
to the following line 542:
$file['name'] = substr($line, strpos($line, sprintf("%s %2s %5s",
$item[5], $item[6], $item[7])) + 13);
When I changed it to
$file['name'] = substr($line, strpos($line, sprintf("%3s %3s %-5s",
$item[5], $item[6], $item[7])) + 14);
That worked for the mayority of files but not for all. It seems to be
connected to my locale, for this user it is LC_ALL=de_DE.utf8.
At the end I had the best result with follwoing solution, and seems to
be the most stable:
Line 488 old:
$stream = @ssh2_exec($this->_stream, 'LC_TIME=C ls -' . $ls_args . ' '
. escapeshellarg($path));
to
$stream = @ssh2_exec($this->_stream, 'LC_TIME=C ls --time-style=+"%d
%m %Y" -' . $ls_args . ' ' . escapeshellarg($path));
Line 542 to
$file['name'] = substr($line, strpos($line, sprintf("%2s %2s %4s",
$item[5], $item[6], $item[7])) + 11);
Line 601
$file['date'] = strtotime('00:00:00' . $item[5] . ' ' . $item[6] . ' '
. $item[7]);
to
$file['date'] = strtotime('00:00:00' . $item[5] . '.' . $item[6] . '.'
. $item[7]);
Thanks