Install the PHP module/exif extension in Centos (no need to reinstall PHP)

Source: Internet
Author: User
Tags imap centos zend

The installation of exif does not require additional libraries, so the installation steps are omitted.

For example, php installation directory:/root/lnmp0.4-full/php-5.2.10/

Run: cd/root/lnmp0.4-full/php-5.2.10/ext/

We want to install the exif module and execute cd exif/

Then run/usr/local/php/bin/phpize to return the following information:

Processing ING:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525

Run the following command:

[Root @ vpser imap] #./configure-with-php-config =/usr/local/php/bin/php-config

[Root @ vpser imap] # make & make install

Return after execution:

Build complete.
Don't forget to run 'Make test '.

Installing shared extensions: �0 �2 �0 �0 �0 �2 �0 �2/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/

Indicates that the operation is successful. Modify/usr/local/php/etc/php. ini.

Search: extension = Add extension = "exif. so" to the end of the last extension ="

Save and run/etc/init. d/php-fpm restart to restart.

Create an exif. php file under/home/wwwroot/with the following content:

<? Php

$ Exif = read_exif_data ('IMG _ 0001. JPG ');
While (list ($ k, $ v) = each ($ exif )){
Echo "$ k: $ v
N ";
}

?>

Here, IMG_0001.JPG is a photo file.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.