View Full Version : enable exif for php?

04-25-2004, 01:06 PM
is there a relatively simple way to add exif support for php? as far as I can tell, i need to recompile php to support it.. but i'm rather new at that..

and if i did, is there anything i would need to watch out for in terms of keeping php working properly w/ DA?


DirectAdmin Support
04-27-2004, 10:26 AM

Download and compile/install exif as per their instructions.

Once that's done, to add it to php, run the following:

cd /usr/local/directadmin/customapache
#edit the configure.php file and add:
# to the list of configure commands (make sure there is a \ at the end of each line except the last one)
./build clean
./buid php


05-18-2007, 09:56 AM

Download and compile/install exif as per their instructions.

Once that's done, to add it to php, run the following:

cd /usr/local/directadmin/customapache
#edit the configure.php file and add:
# to the list of configure commands (make sure there is a \ at the end of each line except the last one)
./build clean
./build php

I just tried this script and there was one little problem.
At the end the script replaced the httpd.conf file with another one.
My site was not working anymore and the browser asked where to save .php files.
After restoring the old httpd.conf file it worked again.

A bug in the script?

07-11-2007, 01:27 AM
I have apache 2, should it be "./build php_ap2 n" on the last line (instead of "./build php")??

05-19-2008, 02:49 AM
i just needed to added --enable-with-exif to my configure line an configure php again. That did it. :)
CL70 (http://www.cyclechaos.com/wiki/Honda_CL70)

03-17-2010, 07:27 AM

I have rebuild PHP with --enable-exif and also tried --enable-with-exif
But phpinfo.php does not show the exif extension.

Must I enabled this also in de php.ini file?

Note, I used apache 2.2.15 and PHP 5.2.6 in CGI mode (suphp)

Can anybody help me with these?

03-17-2010, 08:16 AM
this thread is a bit old, so, are you using customapache or custombuild? apache1.x or 2.x? php4/5/6?

03-19-2010, 09:16 AM
Custombuild, apache 2.2.15, PHP5 in CGI mode, PHP4 in CLI mode.

I did edit the file: /usr/local/directadmin/custombuild/configure/ap2/configure.php5 and add the following line:

Then save the file and rebuild php:
./buid php all
service httpd restart

No errors, but also no exif in phpinfo.phh file..

(why start a new topic if here is a old topic with the same problem?)

03-19-2010, 09:20 AM
no problem on add to an old 3d, my question was related just cause, has you correctly mentioned, the configuration file is in different position so i needed to point you into the right position...

For what you sayd, everything is correct, i would like suggest you to use ./build php n

The next question is, have you added


into the last line? have you added a / at the end of the line before the last?

03-29-2011, 07:03 PM
Yes, I've added a / to the end before the last line.

but also no exif in phpinfo.php file


03-30-2011, 01:45 AM
just to be clear, i wrote the wrong one, a \ is needed and NOT /

Please past your configure.php5

should be like this

--enable-zip \
--enable-wddx \

Or, if you want, i should check your box.

Im also thinkin about you using php as cgi maybe with suphp (right?)

If is correct you have to edit this file:


and NOT



03-30-2011, 11:02 AM
Sorry for my spelling mistake, I used a /. And had configured the file:
/ usr/local/directadmin/custombuild/configure/ap2/configure.php5

But leave it as it was and edit the correct file "/ usr/local/directadmin/custombuild/configure/suphp/configure.php5"

This is the content of the file:

"./configure" \
"--prefix=/usr/local/php5" \
"--enable-force-cgi-redirect" \
"--enable-fastcgi" \
"--with-config-file-path=/usr/local/etc/php5/cgi" \
"--with-curl=/usr/local/lib" \
"--with-gd" \
"--with-gettext" \
"--with-jpeg-dir=/usr/local/lib" \
"--with-freetype-dir=/usr/local/lib" \
"--with-kerberos" \
"--with-openssl" \
"--with-mcrypt" \
"--with-mhash" \
"--with-mysql=/usr" \
"--with-mysqli=/usr/bin/mysql_config" \
"--with-pcre-regex=/usr/local" \
"--with-pdo-mysql=/usr" \
"--with-pear" \
"--with-png-dir=/usr/local/lib" \
"--with-zlib" \
"--with-zlib-dir=/usr/local/lib" \
"--enable-zip" \
"--enable-gd-native-ttf" \
"--with-iconv=/usr/local" \
"--enable-bcmath" \
"--enable-calendar" \
"--enable-ftp" \
"--enable-magic-quotes" \
"--enable-sockets" \
"--enable-mbstring" \

I still can not see the EXIF in the phpinfo, I am trying to install "CF Image Host 1.4" but I get only 1 error:

error: Exif extension is not installed.(the script can be used without exif extension installed) http://php.net/manual/en/book.exif.php

In previous responses mentioned run ". / php buid all", I also I run?, because it does not work, I get error only command or file.

03-30-2011, 11:07 AM
Sorry for the double post, but I can not change the content.
I want to show the Begin of the content of my phpinfo.

PHP Version 5.2.14

Linux residentidle.net 2.6.18-194.26.1.el5.028stab079.2 #1 SMP Fri Dec 17 19:25:15 MSK 2010 x86_64

Build Date
Oct 27 2010 07:20:18

Configure Command
'./configure' '--prefix=/usr/local/php5' '--enable-force-cgi-redirect' '--enable-fastcgi' '--with-config-file-path=/usr/local/etc/php5/cgi' '--with-curl=/usr/local/lib' '--with-gd' '--with-gettext' '--with-jpeg-dir=/usr/local/lib' '--with-freetype-dir=/usr/local/lib' '--with-kerberos' '--with-openssl' '--with-mcrypt' '--with-mhash' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config' '--with-pcre-regex=/usr/local' '--with-pdo-mysql=/usr' '--with-pear' '--with-png-dir=/usr/local/lib' '--with-zlib' '--with-zlib-dir=/usr/local/lib' '--enable-zip' '--enable-gd-native-ttf' '--with-iconv=/usr/local' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-mbstring'

Server API

Virtual Directory Support

Configuration File (php.ini) Path

Loaded Configuration File

Scan this dir for additional .ini files
additional .ini files parsed


PHP Extension

Zend Extension

Debug Build

Thread Safety

Zend Memory Manager

IPv6 Support

Registered PHP Streams
https, ftps, compress.zlib, php, file, data, http, ftp, zip

Registered Stream Socket Transports
tcp, udp, unix, udg, ssl, sslv3, sslv2, tls

Registered Stream Filters
zlib.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed

03-31-2011, 08:26 AM
you have to move the configure files to a custom folder

mkdir -p /usr/local/directadmin/custombuild/custom/configure/ap2
cp -rfp /usr/local/directadmin/custombuild/configure/ap2/configure.php5 /usr/local/directadmin/custombuild/custom/configure/ap2/configure.php5

03-31-2011, 08:22 PM
uhm, I used:

1. . / build clean
2. . / build php n

from usr / local / DirectAdmin / custombuild / configure, and it worked, thanks for the help.

10-27-2011, 01:13 AM
I added entry to configure php
- enable-exif but is a compilation error

/ usr/local/directadmin/custombuild/configure/suphp/configure.php5: line 33: - enable-exif: command not found
please help

my file looks like

"- with-pdo-mysql = / usr" \
"- with-pear '\
"- with-png-dir = / usr / local / lib" \
"- with-zlib '\
"- with-zlib-dir = / usr / local / lib" \
"- enable-zip '\
"- enable-gd-native-ttf '\
"- with-iconv = / usr / local" \
"- enable-bcmath '\
"- enable-calendar '\
"- enable-ftp '\
"- enable-magic-quotes' \
"- enable-sockets' \
"- enable-mbstring '
"- enable-exif '

This file is part configure.php5

10-27-2011, 01:21 AM
"- enable-mbstring '
"- enable-exif '

is missing a \

"- enable-mbstring ' \
"- enable-exif '


10-27-2011, 03:20 AM
Thank you for your help

11-14-2011, 01:03 AM
It is not working here, and donīt understand way.

11-14-2011, 01:12 AM
So provide some logs/errors to analyze, im not a kind of mage :D I need data to inspect errors :D


11-14-2011, 01:33 AM
I have add you to msn , so we can talk.

11-14-2011, 01:38 AM
Please re-send add, ive closed for error pressing ESC and i dont know how to get it back.


11-14-2011, 01:44 AM
You can add me at superhelt76@hotmail.com

08-17-2016, 01:31 AM
What are the friends solve this problem?:)