There is an option in ssh_config which allows this but so far I've not found anything in PHP which allows me to bypass the certificate verification. You are also supposed to be able to have a config file in the user space in Linux which should override defaults but no way have I been able to get this working. Also a shell script can be run to issue an ssh command but this is problematic as not all hosting package allow shell scripts.
I am starting to feel that providing SFTP in my scripts is more trouble than it is worth. For folks who have their DSLStats data on a hosted site you do not need SFTP in the scripts if the script is run from the same host. Again if the data is all on a local network then again SFTP is not really needed, nor is it if the data is on a local disk accessible by a local server.
If anyone can come up with something in PHP which will overcome my issue with certificates then I will have another go at this but right now I cannot continue to develop SFTP support.
Stuart
yeah I am not sure of the purpose of your ftp/sftp stuff, so I wouldnt stress over it too much.
It seems to make sense to have the files hosted on the same machine the script is run on. I dont use the function, the files are uploaded to my server prior to the script been used.
This is what I have in roundcube to make it ignore trust issues on imap/smtp connections, since there is no trusted localhost cert.
$config['smtp_conn_options'] = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'verify_depth' => 3,
),
);
These flags set in php itself, that syntax is just how its applied in the roundcube config.
So you basically need to disable peer verification.
Another option is just to add your own CA as a trusted provider in your local SSL cert repo.