$help.=L10n::t('Could not find a command line version of PHP in the web server PATH.').EOL;
$help.=L10n::t("If you don't have a command line version of PHP installed on your server, you will not be able to run the background processing. See <a href='https://github.com/friendica/friendica/blob/master/doc/Install.md#set-up-the-worker'>'Setup the worker'</a>").EOL;
$help.=EOL.EOL;
$tpl=get_markup_template('field_input.tpl');
$help.=replace_macros($tpl,[
'$field'=>['phpath',L10n::t('PHP executable path'),$phpath,L10n::t('Enter full path to php executable. You can leave this blank to continue the installation.')],
]);
$phpath="";
}
self::addCheck($checks,L10n::t('Command line PHP').($passed?" (<tt>$phpath</tt>)":""),$passed,false,$help);
if($passed){
$cmd="$phpath -v";
$result=trim(shell_exec($cmd));
$passed2=(strpos($result,"(cli)")!==false);
list($result)=explode("\n",$result);
$help="";
if(!$passed2){
$help.=L10n::t("PHP executable is not the php cli binary \x28could be cgi-fgci version\x29").EOL;
self::addCheck($ck_funcs,L10n::t('Apache mod_rewrite module'),false,true,L10n::t('Error: Apache webserver mod-rewrite module is required but not installed.'));
$help=L10n::t('The web installer needs to be able to create a file called ".htconfig.php" in the "config/" folder of your web server and it is unable to do so.').EOL;
$help.=L10n::t('This is most often a permission setting, as the web server may not be able to write files in your folder - even if you can.').EOL;
$help.=L10n::t('At the end of this procedure, we will give you a text to save in a file named .htconfig.php in your Friendica "config/" folder.').EOL;
$help.=L10n::t('You can alternatively skip this procedure and perform a manual installation. Please see the file "INSTALL.txt" for instructions.').EOL;
}
self::addCheck($checks,L10n::t('config/.htconfig.php is writable'),$status,false,$help);
}
publicstaticfunctioncheckSmarty3(&$checks)
{
$status=true;
$help="";
if(!is_writable('view/smarty3')){
$status=false;
$help=L10n::t('Friendica uses the Smarty3 template engine to render its web views. Smarty3 compiles templates to PHP to speed up rendering.').EOL;
$help.=L10n::t('In order to store these compiled templates, the web server needs to have write access to the directory view/smarty3/ under the Friendica top level folder.').EOL;
$help.=L10n::t("Please ensure that the user that your web server runs as \x28e.g. www-data\x29 has write access to this folder.").EOL;
$help.=L10n::t("Note: as a security measure, you should give the web server write access to view/smarty3/ only--not the template files \x28.tpl\x29 that it contains.").EOL;
}
self::addCheck($checks,L10n::t('view/smarty3 is writable'),$status,true,$help);