bump php version requirement

This commit is contained in:
Mario
2022-05-25 08:14:59 +00:00
parent 7be1415a3a
commit 6d00b2e63d
3 changed files with 104 additions and 110 deletions

View File

@@ -387,8 +387,8 @@ class Setup extends \Zotlabs\Web\Controller {
function check_php(&$phpath, &$checks) {
$help = '';
if(version_compare(PHP_VERSION, '7.1') < 0) {
$help .= t('PHP version 7.1 or greater is required.');
if(version_compare(PHP_VERSION, '8.0') < 0) {
$help .= t('PHP version 8.0 or greater is required.');
$this->check_add($checks, t('PHP version'), false, true, $help);
}

View File

@@ -344,19 +344,13 @@ abstract class PhotoDriver {
return false;
}
/*
* PHP 7.2 allows you to use a stream resource, which should reduce/avoid
* memory exhaustion on large images.
*/
if(version_compare(PHP_VERSION, '7.2.0') >= 0) {
$f = @fopen($filename, 'rb');
} else {
$f = $filename;
}
if($f) {
return @exif_read_data($f, null, true);
// exif_read_data accepts a stream resource in php > 7.2
$x = @exif_read_data($f, null, true);
fclose($f);
return $x;
}
return false;

View File

@@ -83,7 +83,7 @@ web server platforms.
Example config scripts are available for these platforms in the install
directory. Apache and nginx have the most support.
- PHP 7.1 or later.
- PHP 8.0 or later.
- PHP *command line* access with register_argc_argv set to true in the
php.ini file - and with no hosting provider restrictions on the use of
@@ -240,7 +240,7 @@ You should also be sure that App::$config['system']['php_path'] is set correctly
in your .htconfig.php file, it should look like (changing it to the correct
PHP location):
App::$config['system']['php_path'] = '/usr/local/php56/bin/php';
App::$config['system']['php_path'] = '/usr/local/php80/bin/php';
#####################################################################