ftp_ssl_connect() Anyone with this working?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

ftp_ssl_connect() Anyone with this working?

Postby wonderm00n » 07. April 2007 17:25

Hi there,

I've downloaded the last version of Xampp and the function ftp_ssl_connect() does not work either in PHP4 or PHP5.

I read that it's something related to the fact the binary wasn't compiled with SSL support... But... Does anyone has the binary compiled so I can use it?

Or any other solution?
wonderm00n
 
Posts: 6
Joined: 07. April 2007 17:22

Postby Wiedmann » 07. April 2007 17:34

Or any other solution?

Don't use the ftp extension. Just use the normal filesystem/directory functions.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby wonderm00n » 07. April 2007 17:40

Wiedmann wrote:
Or any other solution?

Don't use the ftp extension. Just use the normal filesystem/directory functions.


How can I use the normal "filesystem/directory" functions to login to a remote FTP (requires SSL) and list it's contents? I can't... Or... Can I?
wonderm00n
 
Posts: 6
Joined: 07. April 2007 17:22

Postby Wiedmann » 07. April 2007 17:45

How would you do this on your local filesystem?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby wonderm00n » 07. April 2007 17:55

Wiedmann wrote:How would you do this on your local filesystem?


Code: Select all
//List files in a directory
   function dirList ($directory) {       
       // create an array to hold directory list
       $results = array();
       // create a handler for the directory
       $handler = opendir($directory);
       // keep going until all files in directory have been read
       while ($file = readdir($handler)) {
           // if $file isn't this directory or its parent,
           // add it to the results array
           if ($file != '.' && $file != '..')
               $results[] = $file;
       }
       // tidy up: close the handler
       closedir($handler);
       sort($results);
       //folders first
       foreach($results as $temp) {
          if (is_dir($directory."/".$temp)) {
             $files[]=$temp;
          }   
       }
       //files right after folders...
       foreach($results as $temp) {
          if (!is_dir($directory."/".$temp)) {
             $files[]=$temp;
          }   
       }                   
       // done!           
       return $files;               
   }

print_r(dirList('/path/to/the/folder/name'));
wonderm00n
 
Posts: 6
Joined: 07. April 2007 17:22

Postby Wiedmann » 07. April 2007 18:01

What all is a valid value for the first opendir() parameter?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby wonderm00n » 07. April 2007 18:08

Wiedmann wrote:What all is a valid value for the first opendir() parameter?


In the opendir I use a string... with the directory path.
wonderm00n
 
Posts: 6
Joined: 07. April 2007 17:22

Postby Wiedmann » 07. April 2007 18:14

with the directory path.

That is one valid value.

I think you should read the PHP manual about opendir(), other filesystem function and stream wrappers?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby wonderm00n » 07. April 2007 18:21

The problem is the same... No OpenSSL, no SSL on FTP!

I can use scandir() like this:
Code: Select all
print_r(scandir('ftp://user:pass@server:port/'));

and it works.

But not like this:
Code: Select all
print_r(scandir('ftps://user:pass@server:port/'));


And the server I need to connect to requires SSL, so the problem is the same... When I can get OpenSSL to work I'll be able to use both methods: FTP or Filesystem functions.
wonderm00n
 
Posts: 6
Joined: 07. April 2007 17:22

Postby Wiedmann » 07. April 2007 21:46

Well, there is some problem (bug?) in the ftps wrapper from PHP. (I must ask the PHP developers what happens.)
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby wonderm00n » 08. April 2007 16:45

The main issue is... Does anyone is able to use the ftp_ssl_connect() function? If so, what's needed to be done to achieve this?
wonderm00n
 
Posts: 6
Joined: 07. April 2007 17:22

Postby caglar » 11. April 2007 09:18

All of the sources I found says that you should compile from the source, is there anybody out there who had worked the ftp_ssl_connect before and how?
caglar
 
Posts: 1
Joined: 11. April 2007 09:13


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 38 guests