Jump to content
PHP論壇人

6.安裝PHP擴充模組 exif、gmp,更新curl版本


Recommended Posts

---------------------------------------------
安裝PHP擴充模組 exif、gmp
---------------------------------------------

瀏覽已安裝的PHP擴充模組

沒有exif、gmp (IPS論壇push推送用途)

/usr/local/php/bin/php -m

 

解壓縮PHP原始碼包

cd /root/lnmp2.0/src/

tar jxvf php-8.1.28.tar.bz2

 


-----------------------------------------
make exif 擴充模組
-----------------------------------------

cd /root/lnmp2.0/src/php-8.1.28/ext/

cd exif/

/usr/local/php/bin/phpize

./configure --with-php-config=/usr/local/php/bin/php-config

make && make install

 

 

-----------------------------------------
make gmp 擴充模組
-----------------------------------------

cd /root/lnmp2.0/src/php-8.1.28/ext/

cd gmp/

/usr/local/php/bin/phpize

./configure --with-php-config=/usr/local/php/bin/php-config

make && make install

 

 

-----------------------------------------
啟用PHP擴充模組 exif、gmp
-----------------------------------------

修改php.ini
vi /usr/local/php/etc/php.ini


搜尋 ;zend_extension=opcache

在 ;zend_extension=opcache 的底下加入
extension = "exif.so"
extension = "gmp.so"

 

 

儲存並離開
:wq

 

重啟PHP
/etc/init.d/php-fpm restart

 

瀏覽已安裝的PHP擴充模組
可以找到exif、gmp
/usr/local/php/bin/php -m

 

 


---------------------------------------------
更新curl版本
---------------------------------------------

瀏覽curl版本
curl --version

 

可以得知curl版本
curl 7.88.1 (x86_64-pc-linux-gnu) libcurl/7.88.1 OpenSSL/3.0.11 zlib/1.2.13 brotli/1.0.9 zstd/1.5.4 libidn2/2.3.3 libpsl/0.21.2 (+libidn2/2.3.3) libssh2/1.10.0 nghttp2/1.52.0 librtmp/2.3 OpenLDAP/2.5.13

 

IPS論壇需要cURL版本高於7.36版本

因此不用更新curl

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...