Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revision Both sides next revision
litespeed_wiki:php:pecl-extension:gd [2019/11/27 17:29]
qtwrk created
litespeed_wiki:php:pecl-extension:gd [2019/11/27 17:40]
qtwrk
Line 1: Line 1:
-How to Compile GD PHP Extension+===== How to Compile GD PHP Extension ​======
  
-Sometimes the lsphp-gd package is not up-to-date.+Sometimes the lsphp-gd package is not up-to-date ​which may miss some features like webp support
  
-This is guide for how to manually compile GD extension+This is guide for how to manually compile GD extension ​with webp support
  
 +{{ :​litespeed_wiki:​php:​pecl-extension:​lsphp-gd1.jpg |}}
  
 +=== Install dependencies ===
  
-yum install -y lsphp72-devel gcc libjpeg-turbo-devel libpng-devel libXpm-devel freetype-devel libwebp-devel +<​code>​yum install -y lsphp73-devel gcc libjpeg-turbo-devel libpng-devel libXpm-devel freetype-devel libwebp-devel</​code>​ 
-wget https://​www.php.net/​distributions/​php-7.2.24.tar.gz + 
-tar xzvf php-7.2.24.tar.gz +In this example we use lsphp73 , please change it to other appropriate PHP version number if needed. 
-cd php-7.2.24+ 
 + 
 +<​code>​wget https://​www.php.net/​distributions/​php-7.3.12.tar.gz 
 +tar xzvf php-7.3.12.tar.gz 
 +cd php-7.3.12
 cd ext cd ext
 cd gd cd gd
-/​usr/​local/​lsws/​lsphp72/bin/phpize +/​usr/​local/​lsws/​lsphp73/​bin/​phpize 
-/​usr/​local/​lsws/​lsphp72/​bin/​php-config +./configure --with-php-config=/​usr/​local/​lsws/​lsphp73/​bin/​php-config --with-webp-dir=/​usr/​include/​webp --with-freetype-dir=/​usr/​include/​freetype2/​freetype --with-jpeg-dir=/​usr/​include --with-png-dir=/​usr/​include --with-xpm-dir=/​usr/​include
-./configure --with-php-config=/​usr/​local/​lsws/​lsphp72/​bin/​php-config --with-webp-dir=/​usr/​include/​webp --with-freetype-dir=/​usr/​include/​freetype2/​freetype --with-jpeg-dir=/​usr/​include --with-png-dir=/​usr/​include --with-xpm-dir=/​usr/​include+
 make make
-make install +make install</​code>​ 
-pkill lsphp+ 
 +Restart ​lsphp process if necessary and check phpinfo page again. 
 + 
 +{{ :​litespeed_wiki:​php:​pecl-extension:​lsphp-gd2.jpg |}} 
  • Admin
  • Last modified: 2019/11/29 16:04
  • by Lisa Clarke