lnmp安装exif扩展

1.找到位置

cd /usr/local/lnmp1.4-full/src

2.解压php

sudo bzip2 -d php-5.6.31.tar.bz2
sudo tar -xvf php-5.6.31.tar

3.进入php

cd /usr/local/lnmp1.4-full/src/php-5.6.31/ext

4.进入exif

 cd exif && /usr/local/php/bin/phpize

5.配置

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

6.安装

sudo make && sudo make install

7.增加配置

cd /usr/local/php/conf.d
sudo vim 008-exif.ini
extension = "exif.so"

8.重启php

service php-fpm restart

9.查看

php -m
$ php -m |grep exif
exif
<?php
$file_arr = read_exif_data('./photo.jpg');
var_dump($file_arr);
array(45) {
["FileName"]=>
string(9) "photo.jpg"
["FileDateTime"]=>
int(1533333328)
["FileSize"]=>
int(7941835)
["FileType"]=>
int(2)
["MimeType"]=>
string(10) "image/jpeg"
["SectionsFound"]=>
string(30) "ANY_TAG, IFD0, THUMBNAIL, EXIF"
["COMPUTED"]=>
array(8) {
["html"]=>
string(26) "width="3479" height="4567""
["Height"]=>
int(4567)
["Width"]=>
int(3479)
["IsColor"]=>
int(1)
["ByteOrderMotorola"]=>
int(0)
["ApertureFNumber"]=>
string(5) "f/2.8"
["Thumbnail.FileType"]=>
int(2)
["Thumbnail.MimeType"]=>
string(10) "image/jpeg"
}
["Make"]=>
string(5) "Canon"
["Model"]=>
string(12) "Canon EOS 6D"
["XResolution"]=>
string(5) "300/1"
["YResolution"]=>
string(5) "300/1"
["ResolutionUnit"]=>
int(2)
["Software"]=>
string(40) "Adobe Photoshop Camera Raw 8.5 (Windows)"
["DateTime"]=>
string(19) "2018:08:04 11:18:27"
["Exif_IFD_Pointer"]=>
int(208)
["THUMBNAIL"]=>
array(6) {
["Compression"]=>
int(6)
["XResolution"]=>
string(4) "72/1"
["YResolution"]=>
string(4) "72/1"
["ResolutionUnit"]=>
int(2)
["JPEGInterchangeFormat"]=>
int(844)
["JPEGInterchangeFormatLength"]=>
int(13311)
}
["ExposureTime"]=>
string(5) "1/125"
["FNumber"]=>
string(5) "28/10"
["ExposureProgram"]=>
int(1)
["ISOSpeedRatings"]=>
int(160)
["UndefinedTag:0x8830"]=>
int(2)
["UndefinedTag:0x8832"]=>
int(160)
["ExifVersion"]=>
string(4) "0230"
["DateTimeOriginal"]=>
string(19) "2018:07:15 15:36:12"
["DateTimeDigitized"]=>
string(19) "2018:07:15 15:36:12"
["ShutterSpeedValue"]=>
string(15) "6965784/1000000"
["ApertureValue"]=>
string(15) "2970854/1000000"
["ExposureBiasValue"]=>
string(3) "0/1"
["MaxApertureValue"]=>
string(3) "1/1"
["MeteringMode"]=>
int(2)
["Flash"]=>
int(16)
["FocalLength"]=>
string(4) "50/1"
["SubSecTimeOriginal"]=>
string(2) "11"
["SubSecTimeDigitized"]=>
string(2) "11"
["FocalPlaneXResolution"]=>
string(12) "5472000/1436"
["FocalPlaneYResolution"]=>
string(11) "3648000/956"
["FocalPlaneResolutionUnit"]=>
int(2)
["CustomRendered"]=>
int(0)
["ExposureMode"]=>
int(1)
["WhiteBalance"]=>
int(1)
["SceneCaptureType"]=>
int(0)
["UndefinedTag:0xA431"]=>
string(12) "334021005410"
["UndefinedTag:0xA432"]=>
array(4) {
[0]=>
string(4) "50/1"
[1]=>
string(4) "50/1"
[2]=>
string(3) "0/0"
[3]=>
string(3) "0/0"
}
["UndefinedTag:0xA434"]=>
string(16) "EF50mm f/1.4 USM"
["UndefinedTag:0xA435"]=>
string(10) "0000000000"
}

以下几种方式都可以

$file_arr = read_exif_data('./photo.jpg');
$file_arr = read_exif_data('https://cdn.caomall.net/15344950781428748118.jpg');
$file_arr = read_exif_data($_FILES[$file_name]['tmp_name']);

lnmp安装exif扩展的更多相关文章

  1. lnmp安装fileinfo扩展

    1.错误: PHP Fileinfo extension must be installed/enabled to use Intervention Image. 2.原因: 缺少 fileinfo扩 ...

  2. lnmp---------------lnmp1.3-full安装包安装lnmp环境,如何安装PHP扩展

    1. 如果已经安装LNMP套件,请按以下步骤处理 a. 跳转到fileinfo源代码目录` cd /root/downloads/lnmp1.2-full/src/php-7.0.7/ext/file ...

  3. PHP----------安装包lnmp1.3-full安装的lnmp环境,如何安装PHP扩展

    1. 如果已经安装LNMP套件,请按以下步骤处理 a. 跳转到fileinfo源代码目录` cd /root/downloads/lnmp1.2-full/src/php-7.0.7/ext/file ...

  4. WDCP,LNMP安装PHP缓存加速扩展eAccelerator,xcache和memcached

    VPS主机性能配置如果太差,则在运行Wordpress博客和Discuz! 论坛等高消耗程序时能够明显感觉出VPS有些吃力.另外,即使VPS主机的CPU.内存.硬盘I/O等性能足够好,但是在面对大流量 ...

  5. lnmp安装--php安装

    版本:php5.6.4 x86_64 centos 6.6 x86_64 安装php之所以难,是因为要安装的扩展多,依赖关系复杂. 安装前的准备: 先看你想要安装哪些扩展.需要哪些包.下载地址:htt ...

  6. 在ubuntu14.14 安装php扩展扩展出现的问题

    我是在ubuntu14.14 安装的 lnmp. 部分扩展.均已安装好,但是我用apt-get 方式安装 redis和curl扩展时,我的配置都设置但是从phpinfo里面看没有响应的配置项. 于是我 ...

  7. Linux centos7下php安装cphalcon扩展的方法

    说明: 操作系统:CentOS7 php安装目录:/usr/local/php php.ini配置文件路径:/usr/local/php/etc/php.ini 运行环境:LNMP ,PHP7 .安装 ...

  8. centos LNMP第一部分环境搭建 LAMP LNMP安装先后顺序 php安装 安装nginx 编写nginx启动脚本 懒汉模式 mv /usr/php/{p.conf.default,p.conf} php运行方式SAPI介绍 第二十三节课

    centos  LNMP第一部分环境搭建 LAMP安装先后顺序  LNMP安装先后顺序 php安装 安装nginx  编写nginx启动脚本   懒汉模式  mv   /usr/local/php/{ ...

  9. Linux安装redis PHP安装Redis扩展 and基本命令

    一.安装redis 用超级管理员身份运行: $ mkdir /usr/local/redis #redis安装目录 $ cd /usr/local/src #安装包下载目录 $ wget http:/ ...

随机推荐

  1. Axis-Parallel Rectangle

    D - Axis-Parallel Rectangle Time limit : 2sec / Memory limit : 256MB Score : 400 points Problem Stat ...

  2. B - The Suspects(并查集)

    B - The Suspects Time Limit:1000MS     Memory Limit:20000KB     64bit IO Format:%lld & %llu Desc ...

  3. 学习 《UNIX网络编程》

    学习本书之前,为了了解C语言,先通读了<C程序设计语言>.但对C语言的理解.熟悉可能还是不足,所以在学习本书的过程中,遇到看不懂的C代码,还要去查询.思考. 本书一开始,我就遇到了问题,运 ...

  4. cron_action

    crontab   using shell script to automate linux system maintenance tasks Linux中用crontab例行工作安排_Linux教程 ...

  5. Difference between .classpath and MANIFEST.MF

    What is the difference between adding a dependency jar to the .classpath file in a RAD project and a ...

  6. Python 是怎么火起来的?

    Python 之父 Guido 正在设计 Python 语言,结果家里突然潜入一条大蟒蛇,一番激烈斗争,大蟒蛇把 Guido 叔生吞进肚,并洋洋自得:So Who is Guido Van Rossu ...

  7. 我的第一个JSP

    首先在新建一个Webproject 再在WebRoot以下new一个HelloWorld.jsp 改动body里面的内容 <body>     <h1>HelloWorld:& ...

  8. random模块(随机数库)

    random random.random random.random()用于生成一个0到1的随机浮点数: 0 <= n < 1.0 random.uniform random.unifor ...

  9. corethink功能模块探索开发(二)让这个模块可安装

    要想让这个模块可安装,只需要在opcmf.php文件中写一些配置数据就行 随便写点 Equip/opencmf.php <?php // 模块信息配置 return array( // 模块信息 ...

  10. SpringMVC:学习笔记(6)——转换器和格式化

    转换器和格式化 说明 SpringMVC的数据绑定并非没有限制,有案例表明,在SpringMVC如何正确绑定数据方面是杂乱无章的,比如在处理日期映射到Date对象上. 为了能够让SpringMVC进行 ...