php has a ftps bug, please vote this bug up so someone will approve this patch

Update: This fix was finally merged into php 5.6 and 7.0 in Dec. of 2015. It had 165 votes! Thank you for support.

Setting up an FTPS server securly is a big pain. If your environment is behind a NAT, sometimes the server doesn't even know what its public address is, which makes enabling PASV mode fun!

I'm trying to connect to a server setup like this and when I enable PASV mode, it responds with an unroutable internal address.
FileZilla works around this issue by ignoring the address and using the servers inital address instead and everything works as expected.

PHP's FTP library does not. It happily accepts the unroutable address and ultimately fails to connect moments later.

This guy knows what I'm talking about and actually patched php to fix this bug.

If you have a moment, please vote this bug up so it makes it into php's next offical release. 
It was reported in 2011 in version 5.3 and is still unassigned.

phpseclib is awesome

While looking for something to help php connect to a sftp server I stumbled across libphpsec which is a fantastic library that has no dependencies and works in all versions of php. The documentation takes a "cookbook" approch which works really well for me.

The real genius to this library is it makes no assumptions about your environment.
If a suitable native function doesn't exist, there is a pure php one to pick up the slack.
The following are implemented in pure php:

  • BigIntegers
  • RSA
  • SSH2
  • SFTP
  • X.509
  • Symmetric key encryption

    • AES
    • Rijndael
    • Twofish
    • Blowfish
    • DES
    • 3DES
    • RC4
    • RC2

    I'm amazed that someone loved this problem enough to do this much work on it and thankful he chose to open-source it.
    Terrafrost, if your ever able to make it to the Austin PHP Beverage Subgroup; (4th Wednesday) the drinks are on me guy.