getID3() can not parse JPG file

The place for "I can't figure out how to..." questions.
Post Reply
billneo
User
Posts: 3
Joined: Fri May 18, 2007 6:14 pm
Location: sdfs

getID3() can not parse JPG file

Post by billneo » Fri May 18, 2007 6:19 pm

Hi

I am a newbie to getID3().

When I installed getID3() to my space provided by yahoo server, then try to run the demo:

http://www.fosolo.com/getid3/demos/demo ... G_0099.jpg

It seems that the information of jpg can not be got.

Any comments?

Best Regards
Bill

Allan Hansen
getID3() v2 developer
Posts: 445
Joined: Sun May 04, 2003 2:22 pm
Location: Holmegaard, Denmark

Post by Allan Hansen » Sat May 19, 2007 7:28 am

PHP not built with EXIF support.

Take a look at $ThisFileInfo['warning']

James Heinrich
getID3() v1 developer
Posts: 1477
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Post by James Heinrich » Sat May 19, 2007 7:26 pm

More likely that PHP not compiled with GD support: exif_read_data() may provide additional data if available, but the main image data (width, height, etc) is extracted by getimagesize()

billneo
User
Posts: 3
Joined: Fri May 18, 2007 6:14 pm
Location: sdfs

Post by billneo » Sat May 19, 2007 11:34 pm

Thank you very much for your reply, I have check the GD and exif support information, it seems that GD and exif have been enabel.
http://fosolo.com/getid32/demos/testphp.php

It is very weired. It is on the yahoo hosting server, I am suspecting that is the fault.

Best regards
Bil

Allan Hansen
getID3() v2 developer
Posts: 445
Joined: Sun May 04, 2003 2:22 pm
Location: Holmegaard, Denmark

Post by Allan Hansen » Sun May 20, 2007 6:03 am

A little look in the source code revealed the problem in getid3_lib.php, function GetDataImageSize():

It use tempnam('*' to write a temporary file. It fails because PHP does not have access to system temp dirtectory. It is an issue that have been reported before and it will be resolved in next release.

For now, do a search and replace in all php files:

tempnam('*'

=>

tempnam('/path/with/write/access'

billneo
User
Posts: 3
Joined: Fri May 18, 2007 6:14 pm
Location: sdfs

Post by billneo » Sun May 20, 2007 9:53 am

Thank you very much.

I an wondering which path I should use.
for example my tmp path is:
www.mydomain.com/tmp

then should it be:
tempnam('www.mydomain.com/tmp'

Best Regards
Bill

Placebo
User
Posts: 1
Joined: Fri Jun 08, 2007 2:54 pm

Post by Placebo » Fri Jun 08, 2007 3:21 pm

billneo wrote: then should it be:
tempnam('www.mydomain.com/tmp'
No it should be a relative path on the server e.g. /home/www.mydomain.com/tmp

Post Reply