Modify ↓
Opened 3 years ago
Last modified 3 years ago
#2393 new Bug/Fehler
/_installer/includes/check_requirements.php - Nur Fehler in requirement_array
| Reported by: | Volker Strähle | Owned by: | somebody |
|---|---|---|---|
| Priority: | niedrig | Milestone: | modified-shop-2.1.0.0 |
| Component: | Installer | Version: | 2.0.7.2 |
| Keywords: | Cc: | ||
| Blocked By: | Blocking: |
Description (last modified by )
Ich bin gerade selbst aus den Fehlern nicht schlau geworden. Ich würde das Array requirement_array nur füllen bei error == true:
<?php
/* -----------------------------------------------------------------------------------------
$Id: check_requirements.php 14528 2022-06-14 10:21:59Z GTB $
modified eCommerce Shopsoftware
http://www.modified-shop.org
Copyright (c) 2009 - 2013 [www.modified-shop.org]
-----------------------------------------------------------------------------------------
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
$requirement_array = array();
$php_flag = true;
if(version_compare(phpversion(), PHP_VERSION_MIN, "<")){
$error = true;
$php_flag = false;
}
if(version_compare(phpversion(), PHP_VERSION_MAX, ">")){
$php_flag = false;
$error = true;
$requirement_array[] = array(
'name' => 'PHP VERSION',
'version' => phpversion(),
'version_min' => PHP_VERSION_MIN,
'version_max' => PHP_VERSION_MAX,
'status' => $php_flag
);
}
$status = false;
$status_tls = false;
$ssl_version = 'undefined';
$curl_version = array(
'version' => 'undefined'
);
if (function_exists('curl_init')) {
$status = true;
$curl_version = curl_version();
$remote_address = xtc_get_ip_address();
if (substr($remote_address, 0, 4) != '127.'
&& $remote_address != '::1'
&& strpos($_SERVER['SERVER_NAME'], 'localhost') === false
)
{
// check for SSL Version
$ch = curl_init('https://www.howsmyssl.com/a/check');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
curl_close($ch);
$json = json_decode($data);
if (is_object($json)) {
$ssl_version = $json->tls_version;
}
if (version_compare(preg_replace('/[^0-9.]/', '', $ssl_version), SSL_VERSION_MIN, "<")) {
$status_tls = false;
$error = true;
} else {
$status_tls = true;
}
} else {
$status_tls = false;
}
} else {
$error = true;
$requirement_array[] = array(
'name' => 'CURL VERSION',
'version' => $curl_version['version'],
'version_min' => '',
'version_max' => '',
'status' => $status
);
$requirement_array[] = array(
'name' => 'SSL VERSION',
'version' => $ssl_version,
'version_min' => SSL_VERSION_MIN,
'version_max' => '',
'status' => $status_tls
);
}
if (class_exists('mysqli')) {
$status = true;
} else {
$status = false;
$error = true;
$requirement_array[] = array(
'name' => 'MYSQLI',
'version' => '',
'version_min' => '',
'version_max' => '',
'status' => $status
);
}
if (class_exists('finfo')) {
$status = true;
} else {
$status = false;
$error = true;
$requirement_array[] = array(
'name' => 'FILEINFO',
'version' => '',
'version_min' => '',
'version_max' => '',
'status' => $status
);
}
if (function_exists('fsockopen')) {
$status = true;
} else {
$status = false;
$error = true;
$requirement_array[] = array(
'name' => 'FSOCKOPEN',
'version' => '',
'version_min' => '',
'version_max' => '',
'status' => $status
);
}
if (function_exists('mb_get_info')) {
$status = true;
} else {
$status = false;
$error = true;
$requirement_array[] = array(
'name' => 'MBSTRING',
'version' => '',
'version_min' => '',
'version_max' => '',
'status' => $status
);
}
$status = false;
if (function_exists('gd_info')) {
$gd = gd_info();
if ($gd['GD Version'] == '') {
$gd['GD Version'] = 'undefined';
}
if ($gd['GIF Read Support'] == 1 || $gd['GIF Support'] == 1) {
$status = true;
} else {
$error = true;
}
} else {
$gd = array(
'GD Version' => 'undefined'
);
$status = false;
$error = true;
$requirement_array[] = array(
'name' => 'GDlib VERSION',
'version' => $gd['GD Version'],
'version_min' => '',
'version_max' => '',
'status' => $status
);
}
if (class_exists('ZipArchive')) {
$status = true;
} else {
$status = false;
$error = true;
$requirement_array[] = array(
'name' => 'ZIPARCHIVE',
'version' => '',
'version_min' => '',
'version_max' => '',
'status' => $status
);
}
Attachments (0)
Change History (2)
comment:1 by , 3 years ago
| Description: | modified (diff) |
|---|---|
| Summary: | /_installer/incliudes/check_requirements.php - Nur fehlre in requirement_array → /_installer/includes/check_requirements.php - Nur Fehler in requirement_array |
comment:2 by , 3 years ago
| Milestone: | modified-shop-2.0.8.0 → modified-shop-2.1.0.0 |
|---|
Note:
See TracTickets
for help on using tickets.
