# php编译扩展

- URL: https://wuming.si/blog/587/
- Author: Aaron
- Published: 2014-08-05
- Language: zh-Hans
- Categories: Technology
- Originally published at: https://blog.wo.ai/archives/587

今天在php程序中要使用exif信息，发现服务器的php居然没有编译这个模块，网上找了个教程，在这里做个笔记，省得以后忘了。

cd [php-source-dir]/ext/exif/  
export PHP_PREFIX=”[your php install full path]”  
$PHP_PREFIX/bin/phpize  
./configure –enable-exif=shared –with-php-config=$PHP_PREFIX/bin/php-config  
make  
make install 配置php.ini  
extension=”…/exif.so”  
或者设置extension_dir = “[so-path]” , extension=”exif.so” 重起nginx  
---
