phpBB

Code Changes

File: phpbb/install/module/requirements/task/check_server_environment.php

  Unmodified   Added   Modified   Removed
Line 14Line 14
namespace phpbb\install\module\requirements\task;

/**

namespace phpbb\install\module\requirements\task;

/**

 * Installer task that checks if the server meats phpBB requirements

 * Installer task that checks if the server meets phpBB requirements

 */
class check_server_environment extends \phpbb\install\task_base
{

 */
class check_server_environment extends \phpbb\install\task_base
{

Line 70Line 70

// Check for JSON support
$this->check_json();


// Check for JSON support
$this->check_json();

 

// Check for mbstring support
$this->check_mbstring();


// XML extension support check
$this->check_xml();


// XML extension support check
$this->check_xml();

Line 96Line 99
	 */
protected function check_php_version()
{

	 */
protected function check_php_version()
{

		$php_version = PHP_VERSION;

if (version_compare($php_version, '7.1') < 0)

		if (version_compare(PHP_VERSION, '7.2.0', '<'))



		{
$this->response_helper->add_error_message('PHP_VERSION_REQD', 'PHP_VERSION_REQD_EXPLAIN');


		{
$this->response_helper->add_error_message('PHP_VERSION_REQD', 'PHP_VERSION_REQD_EXPLAIN');


Line 153Line 154
		}

$this->response_helper->add_error_message('PHP_JSON_SUPPORT', 'PHP_JSON_SUPPORT_EXPLAIN');

		}

$this->response_helper->add_error_message('PHP_JSON_SUPPORT', 'PHP_JSON_SUPPORT_EXPLAIN');

 

$this->set_test_passed(false);
}

/**
* Checks whether PHP's mbstring extension is available or not
*/
protected function check_mbstring()
{
if (@extension_loaded('mbstring'))
{
$this->set_test_passed(true);
return;
}

$this->response_helper->add_error_message('PHP_MBSTRING_SUPPORT', 'PHP_MBSTRING_SUPPORT_EXPLAIN');


$this->set_test_passed(false);
}


$this->set_test_passed(false);
}