Possible bug in libraries/joomla/client/ftp.php - Joomla! Forum - community, help and support


hi!

i have moved site freebsd server, when stumbled onto problem.

when using ftp layer , try list directory not exist, following error returned:

        * jftp::listdetails: unrecognized directory listing format
        * jftp::listnames: bad response

code: select all

ftp> open localhost
trying ::1...
trying 127.0.0.1...
connected localhost.
220 xxxx.xxx.xxx ftp server (version 6.00ls) ready.
----***----
ftp> system
215 unix type: l8 version: bsd-199506
ftp>exit
> uname -a
freebsd xxxx.xxx.xxx 6.2-release freebsd 6.2-release #0: fri jan 12 11:05:30 utc 2007     root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/smp  i386


unfortunately can't reproduce lastest svn i'm not able checkout code yet on new server (not able administrate @ in fact :-) ), if has 1 running , able try code:

code: select all

      $imagedir = "/some/empty/dir";
      $config      =&jfactory::getconfig();
      $ftp_host   =$config->getvalue('ftp_host');
      $ftp_port   =$config->getvalue('ftp_port');
      $ftp_root   =$config->getvalue('ftp_root');
      $ftp_user   =$config->getvalue('ftp_user');
      $ftp_pass   =$config->getvalue('ftp_pass');

      jimport('joomla.client.ftp');
      $ftp = new jftp( array( 'type' => ftp_binary ) );
      $ftp->connect( $ftp_host, $ftp_port );
      $ftp->login( $ftp_user, $ftp_pass );
      $data->images=$ftp->listnames( $imagedir );


code affected in ftp.php

code: select all

line 1164:
$regexps['unix'] = '([-dl][rwxstst-]+).* ([0-9]*) ([a-za-z0-9]+).* ([a-za-z0-9]+).* ([0-9]*) ([a-za-z]+[0-9: ]*[0-9])[ ]+(([0-9]{1,2}:[0-9]{2})|[0-9]{4}) (.+)';


i try reproduce later, if has possibility of doing this, please do!






Comments

Popular posts from this blog

Error compiling for board Arduino/Genuino Uno.

Installation database is corrupt

esp8266 (nodemcu 0.9) client.write très lent ???