6.0.0-git
2021-01-18

[#6396] ssh2 fails for non EN locale
Summary ssh2 fails for non EN locale
Queue Horde Framework Packages
Queue Version HEAD
Type Bug
State Resolved
Priority 2. Medium
Owners chuck (at) horde (dot) org
Requester michael-dev (at) fami-braun (dot) de
Created 2008-03-07 (4700 days ago)
Due
Updated 2008-03-07 (4700 days ago)
Assigned 2008-03-07 (4700 days ago)
Resolved 2008-03-07 (4700 days ago)
Milestone 3.2
Patch No

History
2008-03-07 22:04:11 Chuck Hagenbuch Comment #3
Assigned to Chuck Hagenbuch
Taken from Horde DevelopersHorde Developers
State ⇒ Resolved
Reply to this comment
Looks okay to me - committed, thanks!
2008-03-07 13:05:34 Jan Schneider Assigned to Horde DevelopersHorde Developers
State ⇒ Assigned
Milestone ⇒ 3.2
 
2008-03-07 12:38:27 michael-dev (at) fami-braun (dot) de Comment #2 Reply to this comment
LC_TIME instead of LC_ALL would be sufficient.
2008-03-07 12:36:39 michael-dev (at) fami-braun (dot) de Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Summary ⇒ ssh2 fails for non EN locale
Queue ⇒ Horde Framework Packages
Reply to this comment
My server has got an non-us locale and ls therefore does not print the 
expected date format in VFS/ssh2.php.

Solution: Change

$stream = @ssh2_exec($this->_stream, "ls -al ".escapeshellarg($path));

and

$stream = @ssh2_exec($this->_stream, "ls -l ".escapeshellarg($path));



into



$stream = @ssh2_exec($this->_stream, "LC_ALL=C ls -al 
".escapeshellarg($path));

and

$stream = @ssh2_exec($this->_stream, "LC_ALL=C ls -l ".escapeshellarg($path));



This sets the locale to the default and works for me.

Saved Queries