PDA

View Full Version : enable exif for php?



lnguyen
04-25-2004, 12: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?

Thanks
Linh

DirectAdmin Support
04-27-2004, 09:26 AM
Hello,

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:
--enable-exif
# 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

John

sander79
05-18-2007, 08:56 AM
Hello,

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:
--enable-exif
# 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

John
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?

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

chriske21
05-19-2008, 01: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)

snaaps
03-17-2010, 06:27 AM
Hello,

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?

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

snaaps
03-19-2010, 08: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:
--enable-exif

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?)

SeLLeRoNe
03-19-2010, 08: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

--enable-exif

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

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

but also no exif in phpinfo.php file

=S

SeLLeRoNe
03-30-2011, 12: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 \
--enable-exif


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:


/usr/local/directadmin/custombuild/configure/suphp/configure.php5

and NOT


/usr/local/directadmin/custombuild/configure/ap2/configure.php5


Regards

dusst
03-30-2011, 10: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:


#!/bin/sh
"./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" \
"--enable-exif"

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.

dusst
03-30-2011, 10: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

System
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
CGI/FastCGI

Virtual Directory Support
disabled

Configuration File (php.ini) Path
/usr/local/etc/php5/cgi

Loaded Configuration File
/usr/local/etc/php5/cgi/php.ini

Scan this dir for additional .ini files
(none)
additional .ini files parsed
(none)

PHP API
20041225

PHP Extension
20060613

Zend Extension
220060519

Debug Build
no

Thread Safety
disabled

Zend Memory Manager
enabled

IPv6 Support
enabled

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

scsi
03-31-2011, 07: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

dusst
03-31-2011, 07: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.

Freecast
10-27-2011, 12:13 AM
hello
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

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

is missing a \


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

Regards

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

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

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

Regards

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

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

Regards

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

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