]> git.mxchange.org Git - friendica.git/blobdiff - mod/install.php
messaging
[friendica.git] / mod / install.php
index d4e04c1a9d4fd8f005a43cd01dbfd2022a789723..b92856690eaa8bf59fad47f34679530085e9c52c 100755 (executable)
@@ -32,7 +32,7 @@ function install_post(&$a) {
                        $dbdata = notags(trim($_POST['dbdata']));
                        $phpath = notags(trim($_POST['phpath']));
 
-                       require_once("dba.php");
+                       require_once("include/dba.php");
                        unset($db);
                        $db = new dba($dbhost, $dbuser, $dbpass, $dbdata, true);
                        /*if(get_db_errno()) {
@@ -114,7 +114,7 @@ function install_content(&$a) {
        global $install_wizard_pass, $db;
        $o = '';
        $wizard_status = "";
-       $install_title = t('Friendica Social Communications Server - Setup');
+       $install_title = t('Friendica Communications Server - Setup');
        
 
        
@@ -251,7 +251,7 @@ function install_content(&$a) {
                        return $o;
                }; break;
                case 3: { // Site settings
-                       require_once('datetime.php');
+                       require_once('include/datetime.php');
                        $dbhost = ((x($_POST,'dbhost')) ? notags(trim($_POST['dbhost'])) : 'localhost');
                        $dbuser = notags(trim($_POST['dbuser']));
                        $dbpass = notags(trim($_POST['dbpass']));
@@ -309,6 +309,7 @@ function check_add(&$checks, $title, $status, $required, $help){
 }
 
 function check_php(&$phpath, &$checks) {
+       $passed = $passed2 = $passed3 = false;
        if (strlen($phpath)){
                $passed = file_exists($phpath);
        } else {
@@ -330,16 +331,30 @@ function check_php(&$phpath, &$checks) {
        check_add($checks, 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 .= t('PHP executable is not the php cli binary (could be cgi-fgci version)'). EOL;
+                       $help .= t('Found PHP version: ')."<tt>$result</tt>";
+               }
+               check_add($checks, t('PHP cli binary'), $passed2, true, $help);
+       }
+       
+       
+       if($passed2) {
                $str = autoname(8);
                $cmd = "$phpath testargs.php $str";
                $result = trim(shell_exec($cmd));
-               $passed2 = $result == $str;
+               $passed3 = $result == $str;
                $help = "";
-               if(!$passed2) {
+               if(!$passed3) {
                        $help .= t('The command line version of PHP on your system does not have "register_argc_argv" enabled.'). EOL;
                        $help .= t('This is required for message delivery to work.');
                }
-               check_add($checks, t('PHP register_argc_argv'), $passed, true, $help);
+               check_add($checks, t('PHP register_argc_argv'), $passed3, true, $help);
        }