Hello,
I'm trying to use the safe mode hack on a SFTP server, however, I'm unable to get it to work.
I have checked the credentials (they look correct) and tried it with and without checking "Connect via FTP-SSL", but no luck.
Can anybody help?
Printable View
Hello,
I'm trying to use the safe mode hack on a SFTP server, however, I'm unable to get it to work.
I have checked the credentials (they look correct) and tried it with and without checking "Connect via FTP-SSL", but no luck.
Can anybody help?
Please note: SFTP (SSH File Transfer Protocol) != FTPS (FTP over SSL/TLS)
Thanks. I definitely need SFTP and not FTPS.
There seems to an extended version of the Safe Mode Hack (an extension of Contao), and I did install it, but I can't get that to work either:
http://www.contao.org/erweiterungsliste ... l#new-name
Here is a (German) forum post about this topic: http://www.contao-community.de/showthre ... s-probleme
I used the extended SMH extension from Contao, with the following code in my localconfig.php:
When I run the install tool, I get the following error:Code:$GLOBALS['TL_CONFIG']['useSmhExtended'] = true; // dies aktiviert den erweiterten SMH.
$GLOBALS['TL_CONFIG']['useSMHClass'] = 'SMHSFTP'; // Bitte lassen Sie diese Option unveraendert, bislang gibt es nur das SFTP Protokoll.
$GLOBALS['TL_CONFIG']['ftpHost'] = 'ftp.domain.nl';
$GLOBALS['TL_CONFIG']['ftpPath'] = '/domains/my_domain/DEFAULT/';
$GLOBALS['TL_CONFIG']['ftpUser'] = 'login_name';
$GLOBALS['TL_CONFIG']['ftpPass'] = 'password******';
$GLOBALS['TL_CONFIG']['ftpPort'] = 22;
I'm sort of at a loss here. Does anybody have any ideas? I use the same credentials to login to the SFTP in the localconfig.php as I do with FileZilla, so that should work.Quote:
Warning: get_class() expects parameter 1 to be object, string given in /domains/my_domain/DEFAULT/plugins/phpseclib/Net/SSH2.php on line 1276
#0 [internal function]: __error(2, 'get_class() exp...', '/domains/my_domain...', 1276, Array)
#1 /domains/my_domain/DEFAULT/plugins/phpseclib/Net/SSH2.php(1276): get_class('password******')
#2 /domains/my_domain/DEFAULT/plugins/phpseclib/Net/SFTP.php(316): Net_SSH2->login('login_name...', 'password******')
#3 /domains/my_domain/DEFAULT/system/libraries/SMHSFTP.php(71): Net_SFTP->login('login_name...', 'password******')
#4 /domains/my_domain/DEFAULT/system/libraries/SMHExtended.php(41): SMHSFTP->connect()
#5 /domains/my_domain/DEFAULT/system/libraries/SMHExtended.php(58): SMHExtended->connect()
#6 /domains/my_domain/DEFAULT/system/libraries/Files.php(79): SMHExtended->__construct()
#7 [internal function]: Files::getInstance()
#8 /domains/my_domain/DEFAULT/system/libraries/System.php(147): call_user_func(Array)
#9 /domains/my_domain/DEFAULT/contao/install.php(171): System->import('Files')
#10 /domains/my_domain/DEFAULT/contao/install.php(1211): InstallTool->run()
#11 {main}
Notice: Expected SSH_FXP_VERSION in /domains/my_domain/DEFAULT/plugins/phpseclib/Net/SFTP.php on line 355
#0 [internal function]: __error(1024, 'Expected SSH_FX...', '/domains/my_domain...', 355, Array)
#1 /domains/my_domain/DEFAULT/plugins/phpseclib/Net/SFTP.php(355): user_error('Expected SSH_FX...', 1024)
#2 /domains/my_domain/DEFAULT/system/libraries/SMHSFTP.php(71): Net_SFTP->login('login_name...', 'password******')
#3 /domains/my_domain/DEFAULT/system/libraries/SMHExtended.php(41): SMHSFTP->connect()
#4 /domains/my_domain/DEFAULT/system/libraries/SMHExtended.php(58): SMHExtended->connect()
#5 /domains/my_domain/DEFAULT/system/libraries/Files.php(79): SMHExtended->__construct()
#6 [internal function]: Files::getInstance()
#7 /domains/my_domain/DEFAULT/system/libraries/System.php(147): call_user_func(Array)
#8 /domains/my_domain/DEFAULT/contao/install.php(171): System->import('Files')
#9 /domains/my_domain/DEFAULT/contao/install.php(1211): InstallTool->run()
#10 {main}
Fatal error: Uncaught exception Exception with message Could not login to sftp: thrown in /domains/my_domain/DEFAULT/system/libraries/SMHSFTP.php on line 73
#0 /domains/my_domain/DEFAULT/system/libraries/SMHExtended.php(41): SMHSFTP->connect()
#1 /domains/my_domain/DEFAULT/system/libraries/SMHExtended.php(58): SMHExtended->connect()
#2 /domains/my_domain/DEFAULT/system/libraries/Files.php(79): SMHExtended->__construct()
#3 [internal function]: Files::getInstance()
#4 /domains/my_domain/DEFAULT/system/libraries/System.php(147): call_user_func(Array)
#5 /domains/my_domain/DEFAULT/contao/install.php(171): System->import('Files')
#6 /domains/my_domain/DEFAULT/contao/install.php(1211): InstallTool->run()
#7 {main}
Hi Cothedo,
One thing I noticed -- smhextended only "officially" works with 2.8. Could it maybe be a compatibility issue?
Quote:
Originally Posted by Medianomaly
Yes, it could be a compatibility issue, however, I have no idea how to fix that. I'm not an experienced programmer.
It's solved now: I managed it by switching to regular FTP instead SFTP.