Bug-fix-patch-13
# Installer JavaScript disabled check # Added 'mbstring' in extension check # Added max execution time check warning
This commit is contained in:
@@ -9,11 +9,12 @@ active
|
||||
|
||||
<div class="woocommerce-message woocommerce-tracker" >
|
||||
<center id="fail" style="font-size: 1.3em">JavaScript Disabled!</center>
|
||||
<p style="font-size:1.0em">Hello, Sparky! You are just few steps away from your support system. It looks like that JavaScript is disabled in your browser or not supported by your browser. FAVEO doesn't work properly without JavaScript, and it may cause errors in installation. Please check and enable JavaScript in your browser in order to install and run FAVEO to its full extent.</p>
|
||||
</div>
|
||||
<p class="wc-setup-actions step">
|
||||
<a href="{!! $url !!}"><input type="submit" id="submitme" class="button-primary button button-large button-next" value="Reload" name="accept1"></a>
|
||||
<p style="font-size:1.0em">Hello, Sparky! You are just a few steps away from your support system. It looks like that JavaScript is disabled in your browser or not supported by your browser. FAVEO doesn't work properly without JavaScript, and it may cause errors in installation. Please check and enable JavaScript in your browser in order to install and run FAVEO to its full extent.</p>
|
||||
<p class="wc-setup-actions step">
|
||||
Have you enabled JavaScript?
|
||||
<a href="{!! $url !!}">Click here</a> to reload the page now.
|
||||
</p>
|
||||
</div>
|
||||
</noscript>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -12,37 +12,7 @@ active
|
||||
|
||||
@section('content')
|
||||
|
||||
<?php //dd(ini_get('disable_functions')); ?>
|
||||
|
||||
|
||||
<?php
|
||||
// $sets = explode(",", ini_get('disable_functions'));
|
||||
// $required_functions = ['escapeshellarg'];
|
||||
// foreach ($sets as $key) {
|
||||
// $key = trim($key);
|
||||
// foreach ($required_functions as $value) {
|
||||
// if($key == $value) {
|
||||
// if (strpos(ini_get('disable_functions'), $key) !== false) {
|
||||
// dd("found");
|
||||
// } else {
|
||||
// dd("not - found");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// dd($sets);
|
||||
|
||||
// // foreach ( as $key => $value) {
|
||||
// // # code...
|
||||
// // }
|
||||
// if (strpos($to_check, $statement) !== false) {
|
||||
// return true;
|
||||
// } else {
|
||||
// return false;
|
||||
// }
|
||||
?>
|
||||
|
||||
<div id="form-content">
|
||||
<div id="form-content">
|
||||
<center><h1>Environment Test</h1></center>
|
||||
@if (Session::has('fail_to_change'))
|
||||
<div class="woocommerce-message woocommerce-tracker" >
|
||||
@@ -208,7 +178,7 @@ function validate_zend_compatibility_mode(&$results) {
|
||||
function validate_extensions(&$results) {
|
||||
$ok = true;
|
||||
|
||||
$required_extensions = array('mcrypt', 'openssl', 'pdo', 'fileinfo', 'curl', 'zip');
|
||||
$required_extensions = array('mcrypt', 'openssl', 'pdo', 'fileinfo', 'curl', 'zip', 'mbstring');
|
||||
|
||||
foreach ($required_extensions as $required_extension) {
|
||||
if (extension_loaded($required_extension)) {
|
||||
@@ -277,6 +247,16 @@ function checkDisabledFunctions(&$results) {
|
||||
return $ok;
|
||||
}
|
||||
|
||||
function checkMaxExecutiontime(&$results)
|
||||
{
|
||||
$ok = true;
|
||||
if ((int)ini_get('max_execution_time') >= 120) {
|
||||
$results[] = new TestResult("Maximum execution time is as per requirement.", STATUS_OK);
|
||||
} else {
|
||||
$results[] = new TestResult("Maximum execution time is too low. Recommneded execution time is 120 seconds ", STATUS_WARNING);
|
||||
}
|
||||
return $ok;
|
||||
}
|
||||
// ---------------------------------------------------
|
||||
// Do the magic
|
||||
// ---------------------------------------------------
|
||||
@@ -288,6 +268,7 @@ $memory_ok = validate_memory_limit($results);
|
||||
$extensions_ok = validate_extensions($results);
|
||||
$file_permission = checkFilePermission($results);
|
||||
$required_functions = checkDisabledFunctions($results);
|
||||
$check_execution_time = checkMaxExecutiontime($results);
|
||||
?>
|
||||
<p class="setup-actions step">
|
||||
<?php
|
||||
@@ -297,7 +278,7 @@ foreach ($results as $result) {
|
||||
?>
|
||||
</p>
|
||||
<?php
|
||||
if ($php_ok && $memory_ok && $extensions_ok && $file_permission && $required_functions) {
|
||||
if ($php_ok && $memory_ok && $extensions_ok && $file_permission && $required_functions && $check_execution_time) {
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user