Install php extension exif under CentOS

1. Extension installation

Enter the exif directory under the extension directory ext of the source package of the corresponding php version, and execute (/usr/local/ is the actual installation directory of php)

/usr/local/php/bin/phpize

The following information will be returned:

Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525

Then execute the following command:

#指定php版本进行环境检查和配置
./configure -with-php-config=/usr/local/php/bin/php-config
#执行编译工作和安装
make && make install

Second, the server configuration

1. Find ;extension=exif.so in the php.ini file, remove the preceding semicolon, if it does not exist, add it manually

Special note: The module configuration must be loaded after placing it in mbstring.so, otherwise exif will not be enabled

3. Find the [exif] section and remove the semicolon from the following statement.

;exif.encode_unicode = ISO-8859-15
;exif.decode_unicode_motorola = UCS-2BE
;exif.decode_unicode_intel = UCS-2LE
;exif.encode_jis =
;exif.decode_jis_motorola = JIS
;exif.decode_jis_intel = JIS

3. Restart PHP

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324934047&siteId=291194637