Re: Manually installation
I don't know about SFTP, but yes you would normally rename .htaccess.default to .htaccess, and manual install of modules is done by placing the unzipped module into the system/modules folder, and then logging into contao/install.php and "updating the database".
Re: Manually installation
I provided the correct login credentials, but I am not able to run the installations and get instead this error message:
"Your server does not support file access via PHP; most likely PHP runs as Apache module under a different user. Therefore please enter your FTP login details, so Contao can modify files via FTP (Safe Mode Hack)."
As I mentioned I have to use SFTP.
Re: Manually installation
Hi eve,
IMHO there is no configuration option
Code:
$GLOBALS['TL_CONFIG']['useSFTP'] = true;
So, use the configuration variables provided by the extension author:
Code:
$GLOBALS['TL_CONFIG']['useSmhExtended'] = true; // this activates the extended smh.
$GLOBALS['TL_CONFIG']['useSMHClass'] = 'SMHSFTP'; // leave this alone, only sftp possible for now.
$GLOBALS['TL_CONFIG']['ftpHost'] = '##your hostname##';
$GLOBALS['TL_CONFIG']['ftpPath'] = '##path on sftp server to TYPOlight##';
$GLOBALS['TL_CONFIG']['ftpUser'] = '##your username##';
$GLOBALS['TL_CONFIG']['ftpPass'] = '##your password##';
$GLOBALS['TL_CONFIG']['ftpPort'] = '22';
(http://www.contao.org/extension-list/vi ... ed.en.html)
Regarding the warning message you get, you should check that there are no blanks, new lines or other characters after the PHP closing tag "?>" and make sure that you save this configuration file with encoding UTF-8 (without BOM)!
Re: Manually installation
I checked for empty lines and blanks, and included this code in the localconfig.php
### INSTALL SCRIPT START ###
$GLOBALS['TL_CONFIG']['useSmhExtended'] = true;
$GLOBALS['TL_CONFIG']['useSMHClass'] = 'SMHSFTP';
$GLOBALS['TL_CONFIG']['ftpHost'] = 'xxx';
$GLOBALS['TL_CONFIG']['ftpPath'] = 'public_html/demo/';
$GLOBALS['TL_CONFIG']['ftpUser'] = 'xxx';
$GLOBALS['TL_CONFIG']['ftpPass'] = 'xxx';
$GLOBALS['TL_CONFIG']['ftpPort'] = 'xxx';
### INSTALL SCRIPT STOP ###
I install Contao in a subdomain for testing purposes.
The Contao Install tool screen shows:
Modify files via FTP
Your server does not support file access via PHP; most likely PHP runs as Apache module under a different user. Therefore please enter your FTP login details, so Contao can modify files via FTP (Safe Mode Hack).
The install form shows pre-filled entries correct, I just reentered the password and this message shows:
Modify files via FTP
Could not connect to FTP server xxx
Your server does not support file access via PHP; most likely PHP runs as Apache module under a different user. Therefore please enter your FTP login details, so Contao can modify files via FTP (Safe Mode Hack).
Between the install attempts I removed the files in the tmp folder, that there are no leftovers.
Re: Manually installation
I do not know, but it could be a problem with an incorrect ftpPath. Additionaly, you can test the functionality of the SMH with the script "smhcheck" (but right now I do not know if this script will work with SFTP too)
Re: Manually installation
The check returns "Safe Mode is not enabled". For security reasons we don't use SFTP port 22.
When I install other CMS products (to bypass security settings), I import all tables via phpMyAdmin manually, upload all files into the appropriate public_html folder, and write database access credentials into the config file, necessary instructions into .htaccess and index.php.
Would this be possible with Contao, when yes, please provide instructions, since I don't know the product yet. Could be the creation of the encryption keys a problem?
Re: Manually installation
For using SFTP I think you should try include the following in your localconfig.php:
Code:
$GLOBALS['TL_CONFIG']['ftpSSL'] = true;
If that won't work then I can tell you that Contao will not work with SFTP out of the box. Because for as far as I know you would normally need the ssh2_connect and ssh2_sftp functions for an SFTP connection. Neither is in any of the Contao code...
Perhaps we should request it as a new feature.
Re: Manually installation
Thanks for all your comments! The ”mhcheck” turned out "Safe Mode is not enabled". I followed all recommendations. I included the line code "$GLOBALS['TL_CONFIG']['ftpSSL'] = true;" in the localconfig.php file as well.
### INSTALL SCRIPT START ###
$GLOBALS['TL_CONFIG']['ftpSSL'] = true;
$GLOBALS['TL_CONFIG']['useSmhExtended'] = true;
$GLOBALS['TL_CONFIG']['useSMHClass'] = 'SMHSFTP';
$GLOBALS['TL_CONFIG']['ftpHost'] = 'xxx';
$GLOBALS['TL_CONFIG']['ftpPath'] = 'public_html/demo/';
$GLOBALS['TL_CONFIG']['ftpUser'] = 'xxx';
$GLOBALS['TL_CONFIG']['ftpPass'] = 'xxx';
$GLOBALS['TL_CONFIG']['ftpPort'] = 'xxx';
### INSTALL SCRIPT STOP ###
This is still the error message where I am now:
Modify files via FTP
Could not connect to FTP server xxx
Your server does not support file access via PHP; most likely PHP runs as Apache module under a different user. Therefore please enter your FTP login details, so Contao can modify files via FTP (Safe Mode Hack).
I assume Contao does not allow installations on SFTP and/or with none default ports. I am open for suggestions, since I am testing the product for a client.
Re: Manually installation
Hi.
After quick looking into system/libraries/SMHSFTP.php (from smhextended extension), libraries/Controller.php and libraries/Files.php, your current status seems to still using Contao's FTP class not SMHSFTP class. If SMHSFTP is really enabled, the error message should be as below instead of "Could not connect to sftp":
Code:
Could not login to sftp: xxx
Could not connect to sftp.
To enable SMHSFTP class,
- Don't set $GLOBALS['TL_CONFIG']['useFTP'] to true.[/*:m:3g4ks2wo]
- $GLOBALS['TL_CONFIG']['ftpSSL'] woud not related to this problem.[/*:m:3g4ks2wo]
Quote:
I assume Contao does not allow installations on SFTP and/or with none default ports.
Contao core supports FTP over SSL but not SFTP(FTP over SSH).
The smhextended extension tried to support SFTP and the extension supports only Contao 2.8.0 (i.e. TYPOlight 2.8.0).
So, it might not work with Contao 2.10.x (or 2.9.x).
Re: Manually installation
The status I am having is: I did create a database, uploaded all files, changed permissions, modified the localconfig.php:
### INSTALL SCRIPT START ###
$GLOBALS['TL_CONFIG']['useSmhExtended'] = true;
$GLOBALS['TL_CONFIG']['useSMHClass'] = 'SMHSFTP';
$GLOBALS['TL_CONFIG']['ftpHost'] = 'xxx';
$GLOBALS['TL_CONFIG']['ftpPath'] = 'public_html/demo/';
$GLOBALS['TL_CONFIG']['ftpUser'] = 'xxx';
$GLOBALS['TL_CONFIG']['ftpPass'] = 'xxx';
$GLOBALS['TL_CONFIG']['ftpPort'] = 'xxx';
### INSTALL SCRIPT STOP ###
When I run install.php (not SFTP port 22) I get this message:
Modify files via FTP
Could not connect to FTP server xxx
Your server does not support file access via PHP; most likely PHP runs as Apache module under a different user. Therefore please enter your FTP login details, so Contao can modify files via FTP (Safe Mode Hack).
The system log shows this warnings:
[26-Sep-2011 19:47:43] PHP Warning: fgets(): supplied argument is not a valid stream resource in .../system/libraries/Config.php on line 151
[26-Sep-2011 19:47:43] PHP Warning: feof(): supplied argument is not a valid stream resource in .../system/libraries/Config.php on line 149
Re: Manually installation
Quote:
Originally Posted by eve
The status I am having is: I did create a database, uploaded all files, changed permissions,
How did you change permissions exactly?
What is ther permission of these directories and a file?
- system[/*:m:165y2c26]
- system/config[/*:m:165y2c26]
- system/config/localconfig.php[/*:m:165y2c26]
Quote:
Originally Posted by eve
The system log shows this warnings:
[26-Sep-2011 19:47:43] PHP Warning: fgets(): supplied argument is not a valid stream resource in .../system/libraries/Config.php on line 151
[26-Sep-2011 19:47:43] PHP Warning: feof(): supplied argument is not a valid stream resource in .../system/libraries/Config.php on line 149
It looks like PHP is failed to open system/config/localconfig.php and your configuration dosen't take effect.
This situation is before the stage using SFTP (or FTP).
Have you check with contao-check?
It suggests basic permissions of files and directories.
Re: Manually installation
I have the following permission settings:
system 755
system/config 775
system/config/localconfig.php 664
system/html 777
system/logs 777
system/tmp 777
Typolight check: PHP configuration no errors
Re: Manually installation
Hi,
My previous analyze was almost wrong. :(
I've re-read contao/install.php and it supports FTP and FTP over SSL.
Sadly, there is no chance to intercept FTP/FTP oer SSL with FTP over SSH by smhextended extension.
Even if smhextended extension on TYPOlight 2.8.0, it might be work as expected *after* install Contao/TYPOlight.
So, smhextended extension could provide FTP over SSH support, but it needs some code hack to Contao core since install.php directly use ftp_connect() or ftp_ssl_connect().