I have installed Apache on my machine so I can use localhost as a PHP server. That works. Right now I am trying to use PHP to send files via SFTP to another server. I looked around a bit and saw phpseclib was recommended. I can't seem to figure out how to install phpseclib. Here are the lines that the website gave:
set_include_path(get_include_path() . PATH_SEPARATOR . 'phpseclib');
You have to set the include path.
I got it working by installing PEAR, following this guide.
By following the guide above, I figured out that apache2 was looking for
php.ini in my
/etc/ folder. But I ran into a problem. In my
/etc/ folder there was no
php.ini file. But there was
php.ini.defualt. So I 'saved as'
php.ini and then modified the include_path.
; UNIX: "/path1:/path2" ;include_path = ".:/php/includes" include_path = ".:/Users/diego/pear/share/pear:/php/includes"
PHP is no longer throwing an error saying that
phpseclib cannot be found.