Installed Ubuntu 16.04
installed Dream CMS and found that all directories have no permissions. Add the source user to the php
user group, the directory permission problem is solved, and then php-mysql
is displayed as off
,After installing php-mysql
, php-gd
shows as off
and I have no solution for a long time, and finally found a solution under google
, but it is different from the problem I encountered. Finally, the modified code runs successfully Display off
as on
php5.7-gd
, please install gd according to your php
version first# php --ri gd
GD Support => enabled
GD headers Version =>2.2.5
GD library Version =>2.2.5
FreeType Support => enabled
FreeType Linkage =>with freetype
FreeType Version =>2.6.1
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version =>8
PNG Support => enabled
libPNG Version =>1.2.54
WBMP Support => enabled
XPM Support => enabled
libXpm Version =>30411
XBM Support => enabled
WebP Support => enabled
Directive => Local Value => Master Value
gd.jpeg_ignore_warning =>0=>0
install/install.inc.php
is 2.0, you need to modify the returned version to the actual version you installed 2.1.1functiongdversion(){//PHP is not enabled.In the case of ini function, if there is GD, it will be treated as 2 by default.Version above 0//Because I am an ubuntu server, php is not configured.ini, so GD2 is returned here.0 version, but my GD version is 2.1.1, so manually configure the version number if(!function_exists('phpinfo')){//if(function_exists('imagecreate')) return '2.0';if(function_exists('imagecreate'))return'2.1.1';elsereturn0;}else{ob_start();phpinfo(8);
$module_info =ob_get_contents();ob_end_clean();if(preg_match("/\bgd\s+version\b[^\d\n\r]+?([\d\.]+)/i", $module_info,$matches)){ $gdversion_h = $matches[1];}else{ $gdversion_h =0;}// return $gdversion_h;return'2.1.1';}
Recommended Posts