For Programmers: Free Programming Magazines  


Home > Archive > PHP PEAR Questions and Answers > April 2005 > AW: [PEAR-BUG] Bug #4102: Problem detecting os method ls()









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author AW: [PEAR-BUG] Bug #4102: Problem detecting os method ls()
webEdition Software GmbH - Christoph Lütjen

2005-04-08, 3:58 pm

Hi,

pattern for unix uses [\w\d] for owner and groupname. This doesn't match
"www-data" ('-' is not a "word" character).

[\w\-] should solve the problem (\d is imho not required, \w matches =
digits
too).

Greetings
Chris

-----Urspr=FCngliche Nachricht-----
Von: PEAR Bug Database [mailto:pear-qa@lists.php.net]=20
Gesendet: Freitag, 8. April 2005 13:08
An: christoph.luetjen@webedition.de
Betreff: [PEAR-BUG] Bug #4102: Problem detecting os method ls()

From: christoph dot luetjen at webedition dot de
Operating system: Debian Linux testing
PHP version: 4.3.9
Package: Net_FTP
Bug Type: Bug
Bug description: Problem detecting os method ls()

Description:
------------
Net_FTP->ls() Function has problems with the following output I've got
from an FTP Server with NET_FTP_RAWLIST

dr-xr-x--- 9 web10 www-data 4096 May 17 2004 .
dr-xr-x--- 9 web10 www-data 4096 May 17 2004 ..
drwx------ 2 root root 4096 May 17 2004 .configs
drwxrwxrwx 15 web10 ftponly 4096 Apr 1 17:33 html
drwxr-xr-x 3 root root 4096 Apr 5 00:00 log
drwxrwxrwx 2 web10 ftponly 4096 Apr 5 16:20 phptmp
drwxr-xr-x 2 web10 ftponly 4096 May 17 2004 restore

ls() function detects this as windows server, possibly there's a problem
with the time / year? (Please don't ask why the server returns this - I
don't know... ;-)

Reproduce code:
---------------
$res =3D $fpt->ls('/', NET_FTP_DIRS_ONLY);


Actual result:
--------------
[6] =3D> Array
(
[name] =3D> 17:33 html
[date] =3D> drwxrwxrwx 15 web10 ftponly 4096
[is_dir] =3D> 1
[stamp] =3D> -1
)
[7] =3D> Array
(
[name] =3D> backup
[date] =3D> drwxr-xr-x 2 root root 4096 May
[is_dir] =3D> 2004
[stamp] =3D> -1
)

--=20
Edit bug report at http://pear.php.net/bugs/bug.php?id=3D4102&edit=3D2
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com