PHP ftp_ssl_connect() in WinXP how to put it working?
Posted by: Jakk (---.dsl.telepac.pt)
Date: March 09, 2008 11:05PM

Hi, I'm really tired of searching on how to put ftp_ssl_connect() to work.

I have win openSSL 0.9.8g, WAMPS 2.0, when I try to use the funtion to connect to an ftp server that requires ssl I get the error:

Fatal error: Call to undefined function ftp_ssl_connect()

sad smiley

<?php

$ftp_server = "193.201.103.89";
$ftp_user_name = "any";
$ftp_user_pass = "user";
$ftp_port = 21992;
$time_out = 10;

//Connect to server
echo "Connecting..."."<br>";
$conn_id = ftp_ssl_connect($ftp_server, $ftp_port, $time_out) or die("Could not connect"winking smiley;

// After connected login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
if ($login_result) {
echo "Loged in OK"."<br>";
}
ftp_close($conn_id);


How do I put this working?


thanks

Options: ReplyQuote
Re: PHP ftp_ssl_connect() in WinXP how to put it working?
Posted by: hambuler (---.cpe.net.cable.rogers.com)
Date: March 10, 2008 01:29AM

You forget to enable php_openssl.

Options: ReplyQuote
Re: PHP ftp_ssl_connect() in WinXP how to put it working?
Posted by: Jakk (---.dsl.telepac.pt)
Date: March 10, 2008 03:29AM

I have it enabled...

Could you run the code with wamp to see if u got the same error?


thanks

Options: ReplyQuote
Re: PHP ftp_ssl_connect() in WinXP how to put it working?
Posted by: hambuler (---.cpe.net.cable.rogers.com)
Date: March 10, 2008 06:10AM

I've got the same error 'Call to undefined function ftp_ssl_connect()' eventhough I enabled php_openssl and add an Environment variable PATH pointing to wamp\bin\php\php5.2.5

I don't think the wamp server2 is compiled with ssl ftp eventhough php_openssl can be enabled. This is a typical example of problems with wamp server. It claims it's open-source but nothing is open.

If you want to insist using ftp_ssl_connect(), you migh consider two alteratives below:

PHP.net says "Why this function may not exist ftp_ssl_connect() is only available if OpenSSL support is enabled into your version of PHP. If it's undefined and you've compiled FTP support then this is why. For Windows you must compile your own PHP binaries to support this function". To compile with ssl ftp, follow this web link: "[www.deciacco.com];


This ftp extension is meant for detailed access to an FTP server providing a wide range of control to the executing script. If you only wish to read from or write to a file on an FTP server, consider using the ftp:// wrapper "[ca3.php.net]; with the filesystem functions "[ca3.php.net]; which provide a simpler and more intuitive interface.

Options: ReplyQuote
Re: PHP ftp_ssl_connect() in WinXP how to put it working?
Posted by: Jakk (---.dsl.telepac.pt)
Date: March 10, 2008 08:35PM

"I don't think the wamp server2 is compiled with ssl ftp eventhough php_openssl can be enabled. This is a typical example of problems with wamp server. It claims it's open-source but nothing is open."

Thats strange. Why dont the WAMPs developers include this so much used SSL funtionalities?

BTW is there any wamps developper arround?


"[www.deciacco.com];
Everything points to this webpage to enable openssl in php and windows, it seems to be the only guy able to do it!!

Well I faced the danting task of compiling php withou knowing anything about visual C++.

and I stop where the error begins:



php5ts.dll.def : error LNK2001: unresolved external symbol xmlXPathCompiledEvalToBoolean
Release_TS\php5ts.lib : fatal error LNK1120: 1 unresolved externals
LINK : fatal error LNK1141: failure during build of exports file
NMAKE : fatal error U1077: 'D:\PRACC5~1\MICROS~1\VC98\BIN\cl.exe' : return code
'0x2'
Stop.



the ftps wrapper doesnt work either, guess the ssl funtions must compiled with php or forget it...


If anyone know anythig about this post a message

thanks

Options: ReplyQuote
Re: PHP ftp_ssl_connect() in WinXP how to put it working?
Posted by: Jakk (---.dsl.telepac.pt)
Date: March 25, 2008 07:39PM

No news about this issue yet?

Still can't use the ssl functions...

Options: ReplyQuote


Sorry, only registered users may post in this forum.