Ejemplo n.º 1
0
 /**
  * This function is required by JInstallerComponent in order to run this script
  *
  * @return	boolean	true
  */
 function com_install()
 {
     static $installable;
     if (isset($installable)) {
         return $installable;
     }
     $db = JFactory::getDBO();
     //Run check on the minimum required server specs. Will roll back install if any check fails
     foreach (array(class_exists('mysqli') => "Your server don't have MySQLi.", version_compare(phpversion(), '5.2', '>=') => "Your PHP version is older than 5.2.", version_compare($db->getVersion(), '5.0.41', '>=') => "Your MySQL server version is older than 5.0.41.") as $succeed => $fail) {
         if (!$succeed) {
             JError::raiseWarning(0, $fail);
             return $installable = false;
         }
     }
     if (extension_loaded('suhosin')) {
         //Attempt setting the whitelist value
         @ini_set('suhosin.executor.include.whitelist', 'tmpl://, file://');
         //Checking if the whitelist is ok
         if (!@ini_get('suhosin.executor.include.whitelist') || strpos(@ini_get('suhosin.executor.include.whitelist'), 'tmpl://') === false) {
             JError::raiseWarning(0, sprintf(JText::_('The install failed because your server has Suhosin loaded, but it\'s not configured correctly. Please follow <a href="%s" target="_blank">this</a> tutorial before you reinstall.'), 'https://nooku.assembla.com/wiki/show/nooku-framework/Known_Issues'));
             return $installable = false;
         }
     }
     if (version_compare('5.3', phpversion(), '<=') && extension_loaded('ionCube Loader')) {
         if (ioncube_loader_iversion() < 40002) {
             JError::raiseWarning(0, sprintf(JText::_('Your server is affected by a bug in ionCube Loader for PHP 5.3 that causes our template layout parsing to fail. Please update to a version later than ionCube Loader 4.0 (your server is %s) before reinstalling.'), ioncube_loader_version()));
             return $installable = false;
         }
     }
     return $installable = true;
 }
Ejemplo n.º 2
0
/**
 * Checks the ion cube loader
 *
 * @return bool|string
 */
function checkIonCubeLoader()
{
    if (!extension_loaded('ionCube Loader')) {
        return false;
    }
    if (!function_exists('ioncube_loader_version')) {
        return false;
    }
    return ioncube_loader_version();
}
Ejemplo n.º 3
0
function ioncube_loader_version_array()
{
    if (function_exists('ioncube_loader_iversion')) {
        $ioncube_loader_iversion = ioncube_loader_iversion();
        $ioncube_loader_version_major = (int) substr($ioncube_loader_iversion, 0, 1);
        $ioncube_loader_version_minor = (int) substr($ioncube_loader_iversion, 1, 2);
        $ioncube_loader_version_revision = (int) substr($ioncube_loader_iversion, 3, 2);
        $ioncube_loader_version = "{$ioncube_loader_version_major}.{$ioncube_loader_version_minor}.{$ioncube_loader_version_revision}";
    } else {
        $ioncube_loader_version = ioncube_loader_version();
        $ioncube_loader_version_major = (int) substr($ioncube_loader_version, 0, 1);
        $ioncube_loader_version_minor = (int) substr($ioncube_loader_version, 2, 1);
    }
    return array('version' => $ioncube_loader_version, 'major' => $ioncube_loader_version_major, 'minor' => $ioncube_loader_version_minor);
}
Ejemplo n.º 4
0
 /**
  * @param array $requirement
  * @return array
  */
 public function check($requirement)
 {
     $requiredVersion = $requirement['value'];
     if (!extension_loaded('ionCube Loader')) {
         return null;
     }
     if (!function_exists('ioncube_loader_version')) {
         return array('type' => self::CHECK_TYPE, 'errorLevel' => $requirement['level'], 'message' => sprintf($this->namespace->get('controller/check_ioncubeloaderversion_unknown'), $requiredVersion));
     }
     $installedVersion = ioncube_loader_version();
     $isValid = version_compare(strtolower($installedVersion), $requiredVersion, '>');
     if ($isValid) {
         return array('type' => self::CHECK_TYPE, 'errorLevel' => Validation::REQUIREMENT_VALID, 'message' => sprintf($this->namespace->get('controller/check_ioncubeloaderversion_success'), $requiredVersion, $installedVersion));
     } else {
         return array('type' => self::CHECK_TYPE, 'errorLevel' => $requirement['level'], 'message' => sprintf($this->namespace->get('check_ioncubeloaderversion_failure'), $requiredVersion, $installedVersion));
     }
 }
Ejemplo n.º 5
0
function mswManSchemaFix($s)
{
    if ($s->email == '' && $s->scriptpath == '' && $s->attachpath == '' && $s->attachhref == '') {
        $hdeskPath = 'http://www.example.com/helpdesk';
        if (isset($_SERVER['HTTP_HOST']) && isset($_SERVER['PHP_SELF'])) {
            $hdeskPath = 'http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . substr($_SERVER['PHP_SELF'], 0, -10);
        }
        $hdeskPathAtt = $hdeskPath . '/content/attachments';
        $hdeskPathFaq = $hdeskPath . '/content/attachments-faq';
        $attachPath = mswSafeImportString(PATH . 'content/attachments');
        $attFaqPath = mswSafeImportString(PATH . 'content/attachments-faq');
        $apiKey = strtoupper(substr(md5(uniqid(rand(), 1)), 3, 10) . '-' . substr(md5(uniqid(rand(), 1)), 3, 8));
        mysql_query("UPDATE `" . DB_PREFIX . "settings` SET\n    `website`             = 'My Help Desk',\n    `email`               = '*****@*****.**',\n    `scriptpath`          = '{$hdeskPath}',\n    `attachpath`          = '{$attachPath}',\n\t`attachhref`          = '{$hdeskPathAtt}',\n\t`attachpathfaq`       = '{$attFaqPath}',\n\t`attachhreffaq`       = '{$hdeskPathFaq}',\n    `adminFooter`         = 'To add your own footer code, click &quot;Settings &amp; Tools > Other Options > Edit Footers&quot;',\n    `publicFooter`        = 'To add your own footer code, click &quot;Settings &amp; Tools > Other Options > Edit Footers&quot;',\n    `prodKey`             = '" . mswProdKeyGen() . "',\n    `encoderVersion`      = '" . (function_exists('ioncube_loader_version') ? ioncube_loader_version() : 'XX') . "',\n    `softwareVersion`     = '" . SCRIPT_VERSION . "',\n\t`apiKey`              = '{$apiKey}'\n    LIMIT 1\n    ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
        // Insert user..
        if (mswRowCount('users') == 0) {
            mysql_query("INSERT INTO `" . DB_PREFIX . "users` (\n      `id`, `ts`, `name`, `email`, `accpass`, `signature`, `notify`, `pageAccess`, `emailSigs`, `notePadEnable`, `delPriv`,\n      `nameFrom`, `emailFrom`, `assigned`, `timezone`\n      ) VALUES (\n      1, UNIX_TIMESTAMP(UTC_TIMESTAMP), 'admin', '*****@*****.**', '" . md5(SECRET_KEY . 'admin') . "', '', 'yes', '', 'no', 'yes', 'yes',\n      '', '', 'no', 'Europe/London'\n      )");
        } else {
            mysql_query("UPDATE `" . DB_PREFIX . "users` SET\n\t  `accpass`  = '" . md5(SECRET_KEY . 'admin') . "'\n\t  WHERE `id` = '1'\n\t  ");
        }
        // Page reload..
        header("Location: index.php");
        exit;
    }
}
Ejemplo n.º 6
0
 private function checkPlatform()
 {
     $output = '';
     $out = function ($msg, $style) use(&$output) {
         $output .= '<' . $style . '>' . $msg . '</' . $style . '>' . PHP_EOL;
     };
     // code below taken from getcomposer.org/installer, any changes should be made there and replicated here
     $errors = array();
     $warnings = array();
     $iniPath = php_ini_loaded_file();
     $displayIniMessage = false;
     if ($iniPath) {
         $iniMessage = PHP_EOL . PHP_EOL . 'The php.ini used by your command-line PHP is: ' . $iniPath;
     } else {
         $iniMessage = PHP_EOL . PHP_EOL . 'A php.ini file does not exist. You will have to create one.';
     }
     $iniMessage .= PHP_EOL . 'If you can not modify the ini file, you can also run `php -d option=value` to modify ini values on the fly. You can use -d multiple times.';
     if (!function_exists('json_decode')) {
         $errors['json'] = true;
     }
     if (!extension_loaded('Phar')) {
         $errors['phar'] = true;
     }
     if (!extension_loaded('filter')) {
         $errors['filter'] = true;
     }
     if (!extension_loaded('hash')) {
         $errors['hash'] = true;
     }
     if (!extension_loaded('ctype')) {
         $errors['ctype'] = true;
     }
     if (!ini_get('allow_url_fopen')) {
         $errors['allow_url_fopen'] = true;
     }
     if (extension_loaded('ionCube Loader') && ioncube_loader_iversion() < 40009) {
         $errors['ioncube'] = ioncube_loader_version();
     }
     if (version_compare(PHP_VERSION, '5.3.2', '<')) {
         $errors['php'] = PHP_VERSION;
     }
     if (!isset($errors['php']) && version_compare(PHP_VERSION, '5.3.4', '<')) {
         $warnings['php'] = PHP_VERSION;
     }
     if (!extension_loaded('openssl')) {
         $errors['openssl'] = true;
     }
     if (!defined('HHVM_VERSION') && !extension_loaded('apcu') && ini_get('apc.enable_cli')) {
         $warnings['apc_cli'] = true;
     }
     ob_start();
     phpinfo(INFO_GENERAL);
     $phpinfo = ob_get_clean();
     if (preg_match('{Configure Command(?: *</td><td class="v">| *=> *)(.*?)(?:</td>|$)}m', $phpinfo, $match)) {
         $configure = $match[1];
         if (false !== strpos($configure, '--enable-sigchild')) {
             $warnings['sigchild'] = true;
         }
         if (false !== strpos($configure, '--with-curlwrappers')) {
             $warnings['curlwrappers'] = true;
         }
     }
     if (ini_get('xdebug.profiler_enabled')) {
         $warnings['xdebug_profile'] = true;
     } elseif (extension_loaded('xdebug')) {
         $warnings['xdebug_loaded'] = true;
     }
     if (!empty($errors)) {
         foreach ($errors as $error => $current) {
             switch ($error) {
                 case 'json':
                     $text = PHP_EOL . "The json extension is missing." . PHP_EOL;
                     $text .= "Install it or recompile php without --disable-json";
                     break;
                 case 'phar':
                     $text = PHP_EOL . "The phar extension is missing." . PHP_EOL;
                     $text .= "Install it or recompile php without --disable-phar";
                     break;
                 case 'filter':
                     $text = PHP_EOL . "The filter extension is missing." . PHP_EOL;
                     $text .= "Install it or recompile php without --disable-filter";
                     break;
                 case 'hash':
                     $text = PHP_EOL . "The hash extension is missing." . PHP_EOL;
                     $text .= "Install it or recompile php without --disable-hash";
                     break;
                 case 'ctype':
                     $text = PHP_EOL . "The ctype extension is missing." . PHP_EOL;
                     $text .= "Install it or recompile php without --disable-ctype";
                     break;
                 case 'unicode':
                     $text = PHP_EOL . "The detect_unicode setting must be disabled." . PHP_EOL;
                     $text .= "Add the following to the end of your `php.ini`:" . PHP_EOL;
                     $text .= "    detect_unicode = Off";
                     $displayIniMessage = true;
                     break;
                 case 'suhosin':
                     $text = PHP_EOL . "The suhosin.executor.include.whitelist setting is incorrect." . PHP_EOL;
                     $text .= "Add the following to the end of your `php.ini` or suhosin.ini (Example path [for Debian]: /etc/php5/cli/conf.d/suhosin.ini):" . PHP_EOL;
                     $text .= "    suhosin.executor.include.whitelist = phar " . $current;
                     $displayIniMessage = true;
                     break;
                 case 'php':
                     $text = PHP_EOL . "Your PHP ({$current}) is too old, you must upgrade to PHP 5.3.2 or higher.";
                     break;
                 case 'allow_url_fopen':
                     $text = PHP_EOL . "The allow_url_fopen setting is incorrect." . PHP_EOL;
                     $text .= "Add the following to the end of your `php.ini`:" . PHP_EOL;
                     $text .= "    allow_url_fopen = On";
                     $displayIniMessage = true;
                     break;
                 case 'ioncube':
                     $text = PHP_EOL . "Your ionCube Loader extension ({$current}) is incompatible with Phar files." . PHP_EOL;
                     $text .= "Upgrade to ionCube 4.0.9 or higher or remove this line (path may be different) from your `php.ini` to disable it:" . PHP_EOL;
                     $text .= "    zend_extension = /usr/lib/php5/20090626+lfs/ioncube_loader_lin_5.3.so";
                     $displayIniMessage = true;
                     break;
                 case 'openssl':
                     $text = PHP_EOL . "The openssl extension is missing, which means that secure HTTPS transfers are impossible." . PHP_EOL;
                     $text .= "If possible you should enable it or recompile php with --with-openssl";
                     break;
             }
             $out($text, 'error');
         }
         $output .= PHP_EOL;
     }
     if (!empty($warnings)) {
         foreach ($warnings as $warning => $current) {
             switch ($warning) {
                 case 'apc_cli':
                     $text = "The apc.enable_cli setting is incorrect." . PHP_EOL;
                     $text .= "Add the following to the end of your `php.ini`:" . PHP_EOL;
                     $text .= "  apc.enable_cli = Off";
                     $displayIniMessage = true;
                     break;
                 case 'sigchild':
                     $text = "PHP was compiled with --enable-sigchild which can cause issues on some platforms." . PHP_EOL;
                     $text .= "Recompile it without this flag if possible, see also:" . PHP_EOL;
                     $text .= "  https://bugs.php.net/bug.php?id=22999";
                     break;
                 case 'curlwrappers':
                     $text = "PHP was compiled with --with-curlwrappers which will cause issues with HTTP authentication and GitHub." . PHP_EOL;
                     $text .= " Recompile it without this flag if possible";
                     break;
                 case 'php':
                     $text = "Your PHP ({$current}) is quite old, upgrading to PHP 5.3.4 or higher is recommended." . PHP_EOL;
                     $text .= " Composer works with 5.3.2+ for most people, but there might be edge case issues.";
                     break;
                 case 'xdebug_loaded':
                     $text = "The xdebug extension is loaded, this can slow down Composer a little." . PHP_EOL;
                     $text .= " Disabling it when using Composer is recommended.";
                     break;
                 case 'xdebug_profile':
                     $text = "The xdebug.profiler_enabled setting is enabled, this can slow down Composer a lot." . PHP_EOL;
                     $text .= "Add the following to the end of your `php.ini` to disable it:" . PHP_EOL;
                     $text .= "  xdebug.profiler_enabled = 0";
                     $displayIniMessage = true;
                     break;
             }
             $out($text, 'comment');
         }
     }
     if ($displayIniMessage) {
         $out($iniMessage, 'comment');
     }
     return !$warnings && !$errors ? true : $output;
 }
Ejemplo n.º 7
0
function checkPlatform($quiet, $disableTls)
{
    $errors = [];
    $warnings = [];
    $iniPath = php_ini_loaded_file();
    $displayIniMessage = FALSE;
    if ($iniPath) {
        $iniMessage = PHP_EOL . PHP_EOL . 'The php.ini used by your command-line PHP is: ' . $iniPath;
    } else {
        $iniMessage = PHP_EOL . PHP_EOL . 'A php.ini file does not exist. You will have to create one.';
    }
    $iniMessage .= PHP_EOL . 'If you can not modify the ini file, you can also run `php -d option=value` to modify ini values on the fly. You can use -d multiple times.';
    if (ini_get('detect_unicode')) {
        $errors['unicode'] = 'On';
    }
    if (extension_loaded('suhosin')) {
        $suhosin = ini_get('suhosin.executor.include.whitelist');
        $suhosinBlacklist = ini_get('suhosin.executor.include.blacklist');
        if (FALSE === stripos($suhosin, 'phar') && (!$suhosinBlacklist || FALSE !== stripos($suhosinBlacklist, 'phar'))) {
            $errors['suhosin'] = $suhosin;
        }
    }
    if (!function_exists('json_decode')) {
        $errors['json'] = TRUE;
    }
    if (!extension_loaded('Phar')) {
        $errors['phar'] = TRUE;
    }
    if (!extension_loaded('filter')) {
        $errors['filter'] = TRUE;
    }
    if (!extension_loaded('hash')) {
        $errors['hash'] = TRUE;
    }
    if (!ini_get('allow_url_fopen')) {
        $errors['allow_url_fopen'] = TRUE;
    }
    if (extension_loaded('ionCube Loader') && ioncube_loader_iversion() < 40009) {
        $errors['ioncube'] = ioncube_loader_version();
    }
    if (version_compare(PHP_VERSION, '5.3.2', '<')) {
        $errors['php'] = PHP_VERSION;
    }
    if (version_compare(PHP_VERSION, '5.3.4', '<')) {
        $warnings['php'] = PHP_VERSION;
    }
    if (!extension_loaded('openssl') && TRUE === $disableTls) {
        $warnings['openssl'] = TRUE;
    } elseif (!extension_loaded('openssl')) {
        $errors['openssl'] = TRUE;
    }
    if (!defined('HHVM_VERSION') && !extension_loaded('apcu') && ini_get('apc.enable_cli')) {
        $warnings['apc_cli'] = TRUE;
    }
    ob_start();
    phpinfo(INFO_GENERAL);
    $phpinfo = ob_get_clean();
    if (preg_match('{Configure Command(?: *</td><td class="v">| *=> *)(.*?)(?:</td>|$)}m', $phpinfo, $match)) {
        $configure = $match[1];
        if (FALSE !== strpos($configure, '--enable-sigchild')) {
            $warnings['sigchild'] = TRUE;
        }
        if (FALSE !== strpos($configure, '--with-curlwrappers')) {
            $warnings['curlwrappers'] = TRUE;
        }
    }
    if (!empty($errors)) {
        out("Some settings on your machine make Composer unable to work properly.", 'error');
        out('Make sure that you fix the issues listed below and run this script again:', 'error');
        foreach ($errors as $error => $current) {
            switch ($error) {
                case 'json':
                    $text = PHP_EOL . "The json extension is missing." . PHP_EOL;
                    $text .= "Install it or recompile php without --disable-json";
                    break;
                case 'phar':
                    $text = PHP_EOL . "The phar extension is missing." . PHP_EOL;
                    $text .= "Install it or recompile php without --disable-phar";
                    break;
                case 'filter':
                    $text = PHP_EOL . "The filter extension is missing." . PHP_EOL;
                    $text .= "Install it or recompile php without --disable-filter";
                    break;
                case 'hash':
                    $text = PHP_EOL . "The hash extension is missing." . PHP_EOL;
                    $text .= "Install it or recompile php without --disable-hash";
                    break;
                case 'unicode':
                    $text = PHP_EOL . "The detect_unicode setting must be disabled." . PHP_EOL;
                    $text .= "Add the following to the end of your `php.ini`:" . PHP_EOL;
                    $text .= "    detect_unicode = Off";
                    $displayIniMessage = TRUE;
                    break;
                case 'suhosin':
                    $text = PHP_EOL . "The suhosin.executor.include.whitelist setting is incorrect." . PHP_EOL;
                    $text .= "Add the following to the end of your `php.ini` or suhosin.ini (Example path [for Debian]: /etc/php5/cli/conf.d/suhosin.ini):" . PHP_EOL;
                    $text .= "    suhosin.executor.include.whitelist = phar " . $current;
                    $displayIniMessage = TRUE;
                    break;
                case 'php':
                    $text = PHP_EOL . "Your PHP ({$current}) is too old, you must upgrade to PHP 5.3.2 or higher.";
                    break;
                case 'allow_url_fopen':
                    $text = PHP_EOL . "The allow_url_fopen setting is incorrect." . PHP_EOL;
                    $text .= "Add the following to the end of your `php.ini`:" . PHP_EOL;
                    $text .= "    allow_url_fopen = On";
                    $displayIniMessage = TRUE;
                    break;
                case 'ioncube':
                    $text = PHP_EOL . "Your ionCube Loader extension ({$current}) is incompatible with Phar files." . PHP_EOL;
                    $text .= "Upgrade to ionCube 4.0.9 or higher or remove this line (path may be different) from your `php.ini` to disable it:" . PHP_EOL;
                    $text .= "    zend_extension = /usr/lib/php5/20090626+lfs/ioncube_loader_lin_5.3.so";
                    $displayIniMessage = TRUE;
                    break;
                case 'openssl':
                    $text = PHP_EOL . "The openssl extension is missing, which means that secure HTTPS transfers are impossible." . PHP_EOL;
                    $text .= "If possible you should enable it or recompile php with --with-openssl";
                    break;
            }
            if ($displayIniMessage) {
                $text .= $iniMessage;
            }
            out($text, 'info');
        }
        out('');
        return FALSE;
    }
    if (!empty($warnings)) {
        out("Some settings on your machine may cause stability issues with Composer.", 'error');
        out('If you encounter issues, try to change the following:', 'error');
        foreach ($warnings as $warning => $current) {
            switch ($warning) {
                case 'apc_cli':
                    $text = PHP_EOL . "The apc.enable_cli setting is incorrect." . PHP_EOL;
                    $text .= "Add the following to the end of your `php.ini`:" . PHP_EOL;
                    $text .= "    apc.enable_cli = Off";
                    $displayIniMessage = TRUE;
                    break;
                case 'sigchild':
                    $text = PHP_EOL . "PHP was compiled with --enable-sigchild which can cause issues on some platforms." . PHP_EOL;
                    $text .= "Recompile it without this flag if possible, see also:" . PHP_EOL;
                    $text .= "    https://bugs.php.net/bug.php?id=22999";
                    break;
                case 'curlwrappers':
                    $text = PHP_EOL . "PHP was compiled with --with-curlwrappers which will cause issues with HTTP authentication and GitHub." . PHP_EOL;
                    $text .= "Recompile it without this flag if possible";
                    break;
                case 'openssl':
                    $text = PHP_EOL . "The openssl extension is missing, which means that secure HTTPS transfers are impossible." . PHP_EOL;
                    $text .= "If possible you should enable it or recompile php with --with-openssl";
                    break;
                case 'php':
                    $text = PHP_EOL . "Your PHP ({$current}) is quite old, upgrading to PHP 5.3.4 or higher is recommended." . PHP_EOL;
                    $text .= "Composer works with 5.3.2+ for most people, but there might be edge case issues.";
                    break;
            }
            if ($displayIniMessage) {
                $text .= $iniMessage;
            }
            out($text, 'info');
        }
        out('');
        return TRUE;
    }
    if (!$quiet) {
        out("All settings correct for using Slicer", 'success');
    }
    return TRUE;
}
Ejemplo n.º 8
0
      * BlockScript
      ******************************************************************/
 /*****************************************************************
  * BlockScript
  ******************************************************************/
 case 'blockscript':
     if (file_exists($bsc = $_SERVER['DOCUMENT_ROOT'] . '/blockscript/tmp/config.php')) {
         include $bsc;
         #	header('Location: /blockscript/detector.php?blockscript=setup&bsap='.$BS_VAL['admin_password']); exit;
     }
     $installed = isset($BS_VAL['license_agreement_accepted']) ? '<span class="ok-color">installed</span>' : '<span class="error-color">not installed</span>';
     $enabled = isset($BS_VAL['license_agreement_accepted']) && !empty($CONFIG['enable_blockscript']) ? '<span class="ok-color">enabled</span>' : '<span class="error-color">disabled</span>';
     if (!($ok = function_exists('ioncube_loader_version'))) {
         $error->add('BlockScript requires IonCube.');
     }
     $IonCubeVersion = $ok && ($tmp = ioncube_loader_version()) ? $tmp : 'not available';
     if ($ok && $tmp != 'not available') {
     }
     # Print header
     $output->title = 'BlockScript&reg;';
     $output->bodyTitle = 'BlockScript&reg; Integration';
     echo <<<OUT
t\t\t<form action="{$self}?blockscript" method="post">
t\t\t<table class="form_table" border="0" cellpadding="0" cellspacing="0">
t\t\t\t<tr>
t\t\t\t\t<td align="right">BlockScript status:</td>
t\t\t\t\t<td><b>{$installed} and {$enabled}</b></td>
t\t\t\t</tr>
t\t\t</table>
t\t\t</form>
t\t\t<div class="hr"></div>
Ejemplo n.º 9
0
         $white = ini_get('suhosin.executor.include.whitelist');
         $black = ini_get('suhosin.executor.include.blacklist');
         if (false === stripos($white, 'phar') || false !== stripos($black, 'phar')) {
             return false;
         }
         return true;
     });
 }
 // check allow url open setting
 check('The "allow_url_fopen" setting is on.', 'The "allow_url_fopen" setting needs to be on.', function () {
     return true == ini_get('allow_url_fopen');
 });
 // check ioncube loader version
 if (extension_loaded('ionCube_loader')) {
     check('You have a supported version of ionCube Loader.', 'Your version of the ionCube Loader is not compatible with Phars.', function () {
         return 40009 > ioncube_loader_version();
     });
 }
 // check apc cli caching
 if (!defined('HHVM_VERSION') && !extension_loaded('apcu') && extension_loaded('apc')) {
     check('The "apc.enable_cli" setting is off.', 'Notice: The "apc.enable_cli" is on and may cause problems with Phars.', function () {
         return false == ini_get('apc.enable_cli');
     }, false);
 }
 echo "{$n}Everything seems good!{$n}{$n}";
 echo "Download{$n}";
 echo "--------{$n}{$n}";
 // Retrieve manifest
 echo " - Downloading manifest...{$n}";
 $manifest = file_get_contents('http://box-project.github.io/box2/manifest.json');
 echo " - Reading manifest...{$n}";
Ejemplo n.º 10
0
if (!version_compare(phpversion(), '5.2', '>=')) {
    $message = JText::_('%s does not support PHP %s. The minimum requirement is PHP 5.2 or later.');
    $message = sprintf($message, $extension_name, phpversion());
    $condition = $user->authorize('com_config', 'manage');
    return $notify($condition, $message);
}
if (!class_exists('mysqli')) {
    $message = JText::_('%s needs the MySQLi (MySQL improved) PHP extension enabled in order to connect with your MySQL database server. MySQLi gives access to security and performance features in MySQL server 4.1 and higher.');
    $message = sprintf($message, $extension_name);
    $condition = $user->authorize('com_config', 'manage');
    return $notify($condition, $message);
}
if (version_compare('5.3', phpversion(), '<=') && extension_loaded('ionCube Loader')) {
    if (ioncube_loader_iversion() < 40002) {
        $message = JText::_('Your server is affected by a bug in ionCube Loader for PHP 5.3 that causes our template layout parsing to fail. Please update to a version later than ionCube Loader 4.0 (your server is %s) before using %s.');
        $message = sprintf($message, ioncube_loader_version(), $extension_name);
        $condition = $user->authorize('com_config', 'manage');
        //Don't return this one, in case the site still works with ionCube loader present
        $notify($condition, $message);
    }
}
// Check if Koowa is active
if (JFactory::getApplication()->getCfg('dbtype') != 'mysqli') {
    $conf = JFactory::getConfig();
    $path = JPATH_CONFIGURATION . DS . 'configuration.php';
    if (JFile::exists($path)) {
        JPath::setPermissions($path, '0644');
        $search = JFile::read($path);
        $replace = str_replace('var $dbtype = \'mysql\';', 'var $dbtype = \'mysqli\';', $search);
        JFile::write($path, $replace);
        JPath::setPermissions($path, '0444');
Ejemplo n.º 11
0
     <td>
      <?php 
$qualified = true;
if (isset($_SERVER['SERVER_SOFTWARE'])) {
    $http = $_SERVER['SERVER_SOFTWARE'];
    $http = explode(" ", $http);
    $http = $http[0];
} else {
    if ($sf = getenv('SERVER_SOFTWARE')) {
        $http = $sf;
    } else {
        $http = 'n/a';
    }
}
if (extension_loaded('ionCube Loader')) {
    $ioncube_version = ioncube_loader_version();
    if (ioncube_loader_iversion() < 40000) {
        $ioncube = "<span style=\"color:#F00\">very old! =(</span>";
        $qualified = false;
    } else {
        $ioncube = "<span style=\"color:#060\">OK! =)</span>";
    }
} else {
    $ioncube_version = "none";
    $ioncube = "<span style=\"color:#900\">Not installed! =(</span>";
    $qualified = false;
}
$mssql = "";
if (extension_loaded('sqlsrv')) {
    $mssql .= "<span style=\"color:#060\">sqlsrv</span><br />";
}
Ejemplo n.º 12
0
<?php

if (!defined('PARENT')) {
    exit;
}
// Check product key exists..
if ($SETTINGS->prodKey == '' || strlen($SETTINGS->prodKey) != 60) {
    $productKey = mswProdKeyGen();
    mysql_query("UPDATE `" . DB_PREFIX . "settings` SET\n  `prodKey` = '{$productKey}'\n  ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
    $SETTINGS->prodKey = $productKey;
}
// Update encoder version if not already..
if ($SETTINGS->encoderVersion == 'XX' && function_exists('ioncube_loader_version')) {
    mysql_query("UPDATE `" . DB_PREFIX . "settings` SET\n  `encoderVersion` = '" . ioncube_loader_version() . "'\n  ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
}
?>
<div class="content">
        
  <div class="header">
    
	<h1 class="page-title"><?php 
echo $msg_adheader9;
?>
</h1>
	
	<span class="clearfix"></span>
	
  </div>
        
  <ul class="breadcrumb">
    <li class="active"><?php 
Ejemplo n.º 13
0
/**
 * Checks platform configuration for common incompatibility issues
 *
 * @param array $errors Populated by method
 * @param array $warnings Populated by method
 *
 * @return bool If any errors or warnings have been found
 */
function getPlatformIssues(&$errors, &$warnings)
{
    $errors = array();
    $warnings = array();
    if ($iniPath = php_ini_loaded_file()) {
        $iniMessage = PHP_EOL . 'The php.ini used by your command-line PHP is: ' . $iniPath;
    } else {
        $iniMessage = PHP_EOL . 'A php.ini file does not exist. You will have to create one.';
    }
    $iniMessage .= PHP_EOL . 'If you can not modify the ini file, you can also run `php -d option=value` to modify ini values on the fly. You can use -d multiple times.';
    if (ini_get('detect_unicode')) {
        $errors['unicode'] = array('The detect_unicode setting must be disabled.', 'Add the following to the end of your `php.ini`:', '    detect_unicode = Off', $iniMessage);
    }
    if (extension_loaded('suhosin')) {
        $suhosin = ini_get('suhosin.executor.include.whitelist');
        $suhosinBlacklist = ini_get('suhosin.executor.include.blacklist');
        if (false === stripos($suhosin, 'phar') && (!$suhosinBlacklist || false !== stripos($suhosinBlacklist, 'phar'))) {
            $errors['suhosin'] = array('The suhosin.executor.include.whitelist setting is incorrect.', 'Add the following to the end of your `php.ini` or suhosin.ini (Example path [for Debian]: /etc/php5/cli/conf.d/suhosin.ini):', '    suhosin.executor.include.whitelist = phar ' . $suhosin, $iniMessage);
        }
    }
    if (!function_exists('json_decode')) {
        $errors['json'] = array('The json extension is missing.', 'Install it or recompile php without --disable-json');
    }
    if (!extension_loaded('Phar')) {
        $errors['phar'] = array('The phar extension is missing.', 'Install it or recompile php without --disable-phar');
    }
    if (!extension_loaded('filter')) {
        $errors['filter'] = array('The filter extension is missing.', 'Install it or recompile php without --disable-filter');
    }
    if (!extension_loaded('hash')) {
        $errors['hash'] = array('The hash extension is missing.', 'Install it or recompile php without --disable-hash');
    }
    if (!extension_loaded('iconv') && !extension_loaded('mbstring')) {
        $errors['iconv_mbstring'] = array('The iconv OR mbstring extension is required and both are missing.', 'Install either of them or recompile php without --disable-iconv');
    }
    if (!ini_get('allow_url_fopen')) {
        $errors['allow_url_fopen'] = array('The allow_url_fopen setting is incorrect.', 'Add the following to the end of your `php.ini`:', '    allow_url_fopen = On', $iniMessage);
    }
    if (extension_loaded('ionCube Loader') && ioncube_loader_iversion() < 40009) {
        $ioncube = ioncube_loader_version();
        $errors['ioncube'] = array('Your ionCube Loader extension (' . $ioncube . ') is incompatible with Phar files.', 'Upgrade to ionCube 4.0.9 or higher or remove this line (path may be different) from your `php.ini` to disable it:', '    zend_extension = /usr/lib/php5/20090626+lfs/ioncube_loader_lin_5.3.so', $iniMessage);
    }
    if (version_compare(PHP_VERSION, '5.3.2', '<')) {
        $errors['php'] = array('Your PHP (' . PHP_VERSION . ') is too old, you must upgrade to PHP 5.3.2 or higher.');
    }
    if (version_compare(PHP_VERSION, '5.3.4', '<')) {
        $warnings['php'] = array('Your PHP (' . PHP_VERSION . ') is quite old, upgrading to PHP 5.3.4 or higher is recommended.', 'Composer works with 5.3.2+ for most people, but there might be edge case issues.');
    }
    if (!extension_loaded('openssl')) {
        $warnings['openssl'] = array('The openssl extension is missing, which means that secure HTTPS transfers are impossible.', 'If possible you should enable it or recompile php with --with-openssl');
    }
    if (extension_loaded('openssl') && OPENSSL_VERSION_NUMBER < 0x1000100f) {
        // Attempt to parse version number out, fallback to whole string value.
        $opensslVersion = trim(strstr(OPENSSL_VERSION_TEXT, ' '));
        $opensslVersion = substr($opensslVersion, 0, strpos($opensslVersion, ' '));
        $opensslVersion = $opensslVersion ? $opensslVersion : OPENSSL_VERSION_TEXT;
        $warnings['openssl_version'] = array('The OpenSSL library (' . $opensslVersion . ') used by PHP does not support TLSv1.2 or TLSv1.1.', 'If possible you should upgrade OpenSSL to version 1.0.1 or above.');
    }
    if (!defined('HHVM_VERSION') && !extension_loaded('apcu') && ini_get('apc.enable_cli')) {
        $warnings['apc_cli'] = array('The apc.enable_cli setting is incorrect.', 'Add the following to the end of your `php.ini`:', '    apc.enable_cli = Off', $iniMessage);
    }
    if (extension_loaded('xdebug')) {
        $warnings['xdebug_loaded'] = array('The xdebug extension is loaded, this can slow down Composer a little.', 'Disabling it when using Composer is recommended.');
        if (ini_get('xdebug.profiler_enabled')) {
            $warnings['xdebug_profile'] = array('The xdebug.profiler_enabled setting is enabled, this can slow down Composer a lot.', 'Add the following to the end of your `php.ini` to disable it:', '    xdebug.profiler_enabled = 0', $iniMessage);
        }
    }
    ob_start();
    phpinfo(INFO_GENERAL);
    $phpinfo = ob_get_clean();
    if (preg_match('{Configure Command(?: *</td><td class="v">| *=> *)(.*?)(?:</td>|$)}m', $phpinfo, $match)) {
        $configure = $match[1];
        if (false !== strpos($configure, '--enable-sigchild')) {
            $warnings['sigchild'] = array('PHP was compiled with --enable-sigchild which can cause issues on some platforms.', 'Recompile it without this flag if possible, see also:', '    https://bugs.php.net/bug.php?id=22999');
        }
        if (false !== strpos($configure, '--with-curlwrappers')) {
            $warnings['curlwrappers'] = array('PHP was compiled with --with-curlwrappers which will cause issues with HTTP authentication and GitHub.', 'Recompile it without this flag if possible');
        }
    }
    // Stringify the message arrays
    foreach ($errors as $key => $value) {
        $errors[$key] = PHP_EOL . implode(PHP_EOL, $value);
    }
    foreach ($warnings as $key => $value) {
        $warnings[$key] = PHP_EOL . implode(PHP_EOL, $value);
    }
    return !empty($errors) || !empty($warnings);
}
Ejemplo n.º 14
0
// HTTP Paths..
$hdeskPath = 'http://www.example.com/helpdesk';
if (isset($_SERVER['HTTP_HOST']) && isset($_SERVER['PHP_SELF'])) {
    $hdeskPath = 'http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . substr($_SERVER['PHP_SELF'], 0, strpos($_SERVER['PHP_SELF'], 'install') - 1);
}
$hdeskPathAtt = $hdeskPath . '/content/attachments';
$hdeskPathFaq = $hdeskPath . '/content/attachments-faq';
// Server Paths..
$attachPath = mswSafeImportString(substr(PATH, 0, strpos(PATH, 'install') - 1) . '/content/attachments');
$attFaqPath = mswSafeImportString(substr(PATH, 0, strpos(PATH, 'install') - 1) . '/content/attachments-faq');
// Other..
$defKeepLogs = mswSafeImportString('a:2:{s:4:"user";s:2:"50";s:3:"acc";s:2:"50";}');
$langSets = mswSafeImportString('a:1:{s:7:"english";s:12:"_default_set";}');
$apiKey = strtoupper(substr(md5(uniqid(rand(), 1)), 3, 10) . '-' . substr(md5(uniqid(rand(), 1)), 3, 8));
mysql_query("TRUNCATE TABLE `" . DB_PREFIX . "settings`");
$q = mysql_query("INSERT INTO `" . DB_PREFIX . "settings` (\n`id`, `website`, `email`, `replyto`, `scriptpath`, `attachpath`, `attachhref`, `attachpathfaq`, `attachhreffaq`, \n`language`, `langSets`, `dateformat`, `timeformat`, `timezone`, `weekStart`, `jsDateFormat`, `kbase`, `enableVotes`, \n`multiplevotes`, `popquestions`, `quePerPage`, `cookiedays`, `renamefaq`, `attachment`, `rename`, `attachboxes`, \n`filetypes`, `maxsize`, `enableBBCode`, `afolder`, `autoClose`, `autoCloseMail`, `smtp_host`, `smtp_user`, `smtp_pass`, \n`smtp_port`, `smtp_security`, `smtp_debug`, `prodKey`, `publicFooter`, `adminFooter`, `encoderVersion`, `softwareVersion`, \n`apiKey`, `apiLog`, `apiHandlers`, `recaptchaPublicKey`, `recaptchaPrivateKey`, `enCapLogin`, `sysstatus`, `autoenable`, \n`disputes`, `offlineReason`, `createPref`, `createAcc`, `loginLimit`, `banTime`, `ticketHistory`, `backupEmails`, \n`closenotify`, `minPassValue`, `accProfNotify`, `newAccNotify`, `recaptchaTheme`, `recaptchaLang`, `enableLog`, \n`defKeepLogs`, `minTickDigits`, `enableMail`, `imap_debug`, `imap_param`, `imap_memory`, `imap_timeout`, \n`disputeAdminStop`\n) VALUES (\n1, '" . mswSafeImportString($_POST['website']) . "', '" . mswSafeImportString($_POST['email']) . "', '',\n'{$hdeskPath}', '{$attachPath}', '{$hdeskPathAtt}', '{$attFaqPath}', '{$hdeskPathFaq}', \n'english', '{$langSets}', 'd M Y', 'H:iA', '" . mswSafeImportString($_POST['timezone']) . "', 'sun', 'DD-MM-YYYY', 'yes', \n'yes', 'yes', 10, 10, 360, 'no', 'yes', 'yes', 5, '.jpg|.zip|.gif|.rar|.png|.pdf', 1048576, 'yes', \n'admin', 0, 'yes', '', '', '', 587, '', 'no', '{$prodKey}', '', '', '" . (function_exists('ioncube_loader_version') ? ioncube_loader_version() : 'XX') . "', \n'" . SCRIPT_VERSION . "', '{$apiKey}', 'yes', 'json,xml', '', '', 'yes', 'yes', '0000-00-00', 'no', '', 'no', 'yes', 5, 5, 'yes', '', 'no', 8, \n'yes', 'yes', 'white', 'en', 'yes', '{$defKeepLogs}', 5, 'yes', 'yes', 'pipe', '0', '0', 'no'\n)");
if (!$q) {
    $data[] = DB_PREFIX . 'settings';
    mswlogDBError(DB_PREFIX . 'settings', mysql_error(), mysql_errno(), __LINE__, __FILE__, 'Insert');
}
//=========================
// INSTALL DEPARTMENTS
//=========================
$depts = array('General Tickets', 'Sales and Billing', 'Technical Support');
mysql_query("TRUNCATE TABLE `" . DB_PREFIX . "departments`");
for ($i = 0; $i < count($depts); $i++) {
    $deptID = $i + 1;
    $q = mysql_query("INSERT INTO `" . DB_PREFIX . "departments` (\n  `id`, `name`, `showDept`, `dept_subject`, `dept_comments`, `orderBy`, `manual_assign`\n  ) VALUES (\n  " . $deptID . ", '" . $depts[$i] . "', 'yes', '', '', '" . $deptID . "', 'no'\n  )");
    if (!$q) {
        $data[] = DB_PREFIX . 'departments';
        mswlogDBError(DB_PREFIX . 'departments', mysql_error(), mysql_errno(), __LINE__, __FILE__, 'Insert ' . $deptID);
Ejemplo n.º 15
0
    print "<br />";
    return $res;
}
function test_ioncube_loading()
{
    echo "Testing whether your system can load ionCube Loader dynamically...";
    $err = ioncube_will_work($what_to_do);
    print $err == '' && phpversion() < '5.2' ? "OK" : "<font color=red>Failed {$err}</font>";
    print "<br />";
    return $err == '' && phpversion() < '5.2';
}
if (phpversion() < "4.0.6") {
    print "aMember requires PHP version 4.0.6 or later. We recommend you to upgrade\n    to <a href='http://www.php.net/downloads.php' target=_blank>latest version</a>";
    exit;
} elseif (ioncube_is_installed()) {
    $enc = "ionCube Loader installed (v." . @ioncube_loader_version() . ")";
} elseif (zend_is_installed()) {
    $enc = "Zend Optimizer installed";
} elseif (test_ioncube_loading()) {
    $enc = "ionCube dynamic loading possible";
} else {
}
print "<b>Testing results:</b><br />";
if ($enc) {
    print "No additional configuration required and aMember will work on your \n    hosting using the following loading method: <b>{$enc}</b><br /><br />";
} else {
    print "Unfortunately, no available loaders found in your system and\n    some additional configuration required. Please \n    contact your hosting support and ask them to do <b>ONE</b> from the \n    following:<ul>\n<li> Disable PHP safe_mode;\n<br />OR\n<li> Install free <a href='http://www.zend.com/store/products/zend-optimizer.php' target=_blank>Zend Optimizer</a>\n<br />OR\n<li> Install free <a href='http://www.ioncube.com/loaders/' target=_blank>ionCube Loader</a>\n</ul>\n    ";
}
if (!function_exists('mysql_connect')) {
    print "<br /><font color=red><b>Additionally, PHP has no MySQL support \n    compiled-in</b></font>, please ask your hosting provider to add it.<br /><br />";
}
Ejemplo n.º 16
0
 /**
  * Check the platform for possible issues on running Puli.
  *
  * @return bool Whether the platform requirements are satisfied.
  */
 private function validateSystem()
 {
     $errors = array();
     $warnings = array();
     $iniPath = php_ini_loaded_file();
     $displayIniMessage = false;
     if ($iniPath) {
         $iniMessage = PHP_EOL . PHP_EOL . 'The php.ini used by your command-line PHP is: ' . $iniPath;
     } else {
         $iniMessage = PHP_EOL . PHP_EOL . 'A php.ini file does not exist. You will have to create one.';
     }
     $iniMessage .= PHP_EOL . 'If you can not modify the ini file, you can also run `php -d option=value` to modify ini values on the fly. You can use -d multiple times.';
     if (ini_get('detect_unicode')) {
         $errors['unicode'] = 'On';
     }
     if (extension_loaded('suhosin')) {
         $suhosin = ini_get('suhosin.executor.include.whitelist');
         $suhosinBlacklist = ini_get('suhosin.executor.include.blacklist');
         if (false === stripos($suhosin, 'phar') && (!$suhosinBlacklist || false !== stripos($suhosinBlacklist, 'phar'))) {
             $errors['suhosin'] = $suhosin;
         }
     }
     if (!function_exists('json_decode')) {
         $errors['json'] = true;
     }
     if (!extension_loaded('Phar')) {
         $errors['phar'] = true;
     }
     if (!ini_get('allow_url_fopen')) {
         $errors['allow_url_fopen'] = true;
     }
     if (extension_loaded('ionCube Loader') && ioncube_loader_iversion() < 40009) {
         $errors['ioncube'] = ioncube_loader_version();
     }
     if (version_compare(PHP_VERSION, '5.3.9', '<')) {
         $errors['php'] = PHP_VERSION;
     }
     if (!extension_loaded('openssl')) {
         $errors['openssl'] = true;
     }
     if (!defined('HHVM_VERSION') && !extension_loaded('apcu') && ini_get('apc.enable_cli')) {
         $warnings['apc_cli'] = true;
     }
     ob_start();
     phpinfo(INFO_GENERAL);
     $phpinfo = ob_get_clean();
     if (preg_match('{Configure Command(?: *</td><td class="v">| *=> *)(.*?)(?:</td>|$)}m', $phpinfo, $match)) {
         $configure = $match[1];
         if (false !== strpos($configure, '--enable-sigchild')) {
             $warnings['sigchild'] = true;
         }
         if (false !== strpos($configure, '--with-curlwrappers')) {
             $warnings['curlwrappers'] = true;
         }
     }
     if (!empty($errors)) {
         $this->error('Some settings on your machine make Puli unable to work properly.');
         $this->error('Make sure that you fix the issues listed below and run this script again:');
         foreach ($errors as $error => $current) {
             $text = '';
             switch ($error) {
                 case 'json':
                     $text = PHP_EOL . 'The json extension is missing.' . PHP_EOL;
                     $text .= 'Install it or recompile php without --disable-json';
                     break;
                 case 'phar':
                     $text = PHP_EOL . 'The phar extension is missing.' . PHP_EOL;
                     $text .= 'Install it or recompile php without --disable-phar';
                     break;
                 case 'unicode':
                     $text = PHP_EOL . 'The detect_unicode setting must be disabled.' . PHP_EOL;
                     $text .= 'Add the following to the end of your `php.ini`:' . PHP_EOL;
                     $text .= '    detect_unicode = Off';
                     $displayIniMessage = true;
                     break;
                 case 'suhosin':
                     $text = PHP_EOL . 'The suhosin.executor.include.whitelist setting is incorrect.' . PHP_EOL;
                     $text .= 'Add the following to the end of your `php.ini` or suhosin.ini (Example path [for Debian]: /etc/php5/cli/conf.d/suhosin.ini):' . PHP_EOL;
                     $text .= '    suhosin.executor.include.whitelist = phar ' . $current;
                     $displayIniMessage = true;
                     break;
                 case 'php':
                     $text = PHP_EOL . "Your PHP ({$current}) is too old, you must upgrade to PHP 5.3.9 or higher.";
                     break;
                 case 'allow_url_fopen':
                     $text = PHP_EOL . 'The allow_url_fopen setting is incorrect.' . PHP_EOL;
                     $text .= 'Add the following to the end of your `php.ini`:' . PHP_EOL;
                     $text .= '    allow_url_fopen = On';
                     $displayIniMessage = true;
                     break;
                 case 'ioncube':
                     $text = PHP_EOL . "Your ionCube Loader extension ({$current}) is incompatible with Phar files." . PHP_EOL;
                     $text .= 'Upgrade to ionCube 4.0.9 or higher or remove this line (path may be different) from your `php.ini` to disable it:' . PHP_EOL;
                     $text .= '    zend_extension = /usr/lib/php5/20090626+lfs/ioncube_loader_lin_5.3.so';
                     $displayIniMessage = true;
                     break;
                 case 'openssl':
                     $text = PHP_EOL . 'The openssl extension is missing, which means that secure HTTPS transfers are impossible.' . PHP_EOL;
                     $text .= 'If possible you should enable it or recompile php with --with-openssl';
                     break;
             }
             if ($displayIniMessage) {
                 $text .= $iniMessage;
             }
             $this->info($text);
         }
         echo PHP_EOL;
         return false;
     }
     if (!empty($warnings)) {
         $this->error('Some settings on your machine may cause stability issues with Puli.');
         $this->error('If you encounter issues, try to change the following:');
         foreach ($warnings as $warning => $current) {
             $text = '';
             switch ($warning) {
                 case 'apc_cli':
                     $text = PHP_EOL . 'The apc.enable_cli setting is incorrect.' . PHP_EOL;
                     $text .= 'Add the following to the end of your `php.ini`:' . PHP_EOL;
                     $text .= '    apc.enable_cli = Off';
                     $displayIniMessage = true;
                     break;
                 case 'sigchild':
                     $text = PHP_EOL . 'PHP was compiled with --enable-sigchild which can cause issues on some platforms.' . PHP_EOL;
                     $text .= 'Recompile it without this flag if possible, see also:' . PHP_EOL;
                     $text .= '    https://bugs.php.net/bug.php?id=22999';
                     break;
                 case 'curlwrappers':
                     $text = PHP_EOL . 'PHP was compiled with --with-curlwrappers which will cause issues with HTTP authentication and GitHub.' . PHP_EOL;
                     $text .= 'Recompile it without this flag if possible';
                     break;
                 case 'openssl':
                     $text = PHP_EOL . 'The openssl extension is missing, which means that secure HTTPS transfers are impossible.' . PHP_EOL;
                     $text .= 'If possible you should enable it or recompile php with --with-openssl';
                     break;
             }
             if ($displayIniMessage) {
                 $text .= $iniMessage;
             }
             $this->info($text);
         }
         echo PHP_EOL;
         return true;
     }
     if (!$this->quiet) {
         $this->success('All settings correct for using Puli');
     }
     return true;
 }
Ejemplo n.º 17
0
            if (current_user_can("activate_plugins")) {
                echo "<a href=\"https://www.mapsmarker.com/renew\" target=\"_blank\"  style=\"font-size:125%;font-weight:bold;\">&raquo; " . __("please click here to renew your access to plugin updates and support", "lmm") . " &laquo;</a>";
                echo "<p>" . __("Important: please click the update button next to the license key after purchasing a renewal to finish your order.", "lmm") . "</p>";
            } else {
                echo "<span style=\"font-size:125%;font-weight:bold;\">" . sprintf(__("Please contact your administrator (%1s) to renew your access to plugin updates and support.", "lmm"), "<a href=\"mailto:" . get_bloginfo("admin_email") . "?subject=" . esc_attr__("Maps Marker Pro - renewal for access to plugin updates and support needed", "lmm") . "\">" . get_bloginfo("admin_email") . "</a>") . "</span>";
            }
        }
    }
} else {
    if ($lt->lw && la($Oa = FALSE, $lb = TRUE) === TRUE && la($Oa = l0, $lb = FALSE) === FALSE) {
        if (extension_loaded("ionCube Loader")) {
            if (function_exists("ioncube_loader_iversion")) {
                $O1s = ioncube_loader_iversion();
                $l1t = (int) substr($O1s, 0, 1);
            } else {
                $O1t = ioncube_loader_version();
                $l1t = (int) substr($O1t, 0, 1);
            }
            if ($l1t >= 4) {
                $O21 = "";
            } else {
                $O21 = strrev("orp-");
            }
        } else {
            $O21 = strrev("orp-");
        }
        if (current_user_can("activate_plugins")) {
            $l22 = "https://www.mapsmarker.com/updates" . $O21 . "/archive";
            echo "<div id='message' class='error' style='padding:5px;'><strong>" . sprintf(__("Error: This version of the plugin was released after your download access expired. Please <a href=\"%1\$s\" target=\"_blank\">renew your download and support access</a> or <a href=\"%2\$s\" target=\"_blank\">downgrade to your previous valid version</a>.", "lmm"), "https://www.mapsmarker.com/renew", $l22) . "</strong></div>";
        } else {
            echo "<div id='message' class='error' style='padding:5px;'><strong>" . sprintf(__("Error: This version of the plugin was released after your download access expired. Please contact your administrator (%1s) to renew your access to plugin updates and support or to downgrade to your previous valid version.", "lmm"), "<a href=\"mailto:" . get_bloginfo("admin_email") . "?subject=" . esc_attr__("Maps Marker Pro - renewal for access to plugin updates and support needed", "lmm") . "\">" . get_bloginfo("admin_email") . "</a>") . "</strong></div>";