Safe Mode Hack
From Contao Community Documentation
Use the Safe Mode Hack (SMH) when the System check tells you to do so or when you encounter problems with uploading or manipulating files in Contao. It is a workaround so try talking to your webspace-provider first if they are willing to change the settings.
Activating the Safe Mode Hack is easy. You can activate it directly during the installation process. When you open the /contao/install.php with your browser it should prompt you with the request to fill in your FTP data for the Safe Mode Hack.
If you don't get the request during the installation or want to configurate the Safe Mode Hack manually, just download the file localconfig.php from /system/config/ and open it with a text editor. Make sure that this editor works with UTF-8 character encoding.
Hint: | I like to use the freeware editor PSPad. Before opening a file with PSPad you need to click on Format > UTF-8. When you edit Contao files with this editor also check twice if the format of the file is UTF-8 before you save it. You'll encounter weird problems if you save Contao files not with UTF-8 character encoding. |
Fill in the following information somewhere between ### INSTALL SCRIPT START ### and ?>:
$GLOBALS['TL_CONFIG']['useFTP'] = true; $GLOBALS['TL_CONFIG']['ftpHost'] = 'fill in your domain name here'; $GLOBALS['TL_CONFIG']['ftpPath'] = 'fill in your relative ftp path here'; $GLOBALS['TL_CONFIG']['ftpUser'] = 'fill in the username of your FTP data here'; $GLOBALS['TL_CONFIG']['ftpPass'] = 'fill in the password of your FTP data here'; $GLOBALS['TL_CONFIG']['ftpSSL'] = ''; $GLOBALS['TL_CONFIG']['ftpPort'] = 21;
Of course you need to change the informations accordingly to your webspace FTP-data. Change the setting for ftpSSL only if you want to use SSL-connection for the Safe Mode Hack.
Save localconfig.php after the modification and upload it to system/config/ of your Contao installation.
Write permissions on folders
If you activated the Safe Mode Hack manually, you'll also need to change the CHMOD permissions to 777 with your FTP program on these folders:
- system/html
- system/logs
- system/tmp