473,385 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

GetImageSize problem!

Hey All,

Running Redhat9, Apache 2.0.40, PHP 4.3.4.

GD support is enabled.

GetImageSize() returns FALSE on almost all JPGs, but does return with
the correct info on *some* JPGs. The array returned is empty.

This problem did not exist on my RedHat7.2, PHP 4.3.3, Apache 1.36
system.

I noticed references to this problem in earlier versions of PHP
relating to streams, but supposedly fixed. Still a problem for me!

Please help!
Thanks,
Jonathan.
ki*******@yahoo.com
Jul 17 '05 #1
1 8891
Jonathan Lindo wrote:
Hey All,

Running Redhat9, Apache 2.0.40, PHP 4.3.4.

GD support is enabled.

GetImageSize() returns FALSE on almost all JPGs, but does return with
the correct info on *some* JPGs. The array returned is empty.

This problem did not exist on my RedHat7.2, PHP 4.3.3, Apache 1.36
system.

I noticed references to this problem in earlier versions of PHP
relating to streams, but supposedly fixed. Still a problem for me!

Please help!
Thanks,
Jonathan.
ki*******@yahoo.com

Two things I can think off:

1) Are you sure they are jpg's, and not gif's that have "jpg" file
suffixes????

2) I believe there are different types of JPGs - I can't remember the
reason behind it, but I believe those that originate from Digital
camera's are likely to cause you the problem (though I have never
actually found the problem myself, I have read it somewhere (perhaps GD
info? Honestly... I can't recall at the moment). I believe jpg's
contain info (it can contain copyright info or some message text that is
not displayed when the image is displayed plus some other crap). I
believe the photos from *some* digital cameras do their best to create
small image files and therefore leave out some of this information -
This *might* be the cause of your problem.

Suggestion:
http://ca2.php.net/manual/en/functio...-imagetype.php

Run imagetype() against a 'good' image, and a 'bad' image and see if any
of the info returned after using the above function differs...

Lastly... if none of the above helps, might I suggest you post an update
on this post and tell folk exactly which version of GD that you are
using - I'm not aware of any problems with any GD functions that are
jpeg related, but someone else might...

Hope something above helps...

randelld
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Philip D Heady | last post by:
What is with this error message?????? First part validates, second part fails... getimagesize (filename...) failed to open stream: No such file or directory } elseif ($photo) { $ext =...
8
by: Xenophobe | last post by:
I developed a simple tool to allow users to upload .GIF image files. It works great on my dev box and $_FILES returns "image/gif", but on the prod site it returns "application/octet-stream". ...
4
by: rcb845 | last post by:
Hi everybody of the PHP community, I am using the php function "getimagesize()" to access the width/height of an image from the Web. This function should return false if image is not available....
1
by: sree | last post by:
Hi, am new bie to this group. I requesting help from you all. Am geeting warnig with getimagesize() function. I will explain my query by first giving my code. $src = $_GET; $imageInfo =...
1
by: lawrence k | last post by:
I've got an intermittent bug that is very hard to trace. On my site, if I log into a new account and try to upload some images, something goes wrong the first time. Everything works fine after the...
1
by: Karl Groves | last post by:
I am working on a personal project and having trouble with getimagesize() I have an URL to a file I *know* for a fact exists. The url in question is pulling longblob data from the database....
2
by: bizt | last post by:
Hi, Is it possible to obtain the width/ height of an image when that image is dyanically created using a PHP script and passing GET attributes. For example: <img...
7
by: Ja NE | last post by:
(as first - thank you for all your help several years ago, and second - please apologise me for my clumsy enlgish) so, preface: some users on my photo related site sometimes enter (link) giant...
0
by: RobUK | last post by:
We have Apache on the local network managing several websites that are accessed using virtual domains (configured in the local machine's hosts file, eg. 192.168.1.10 points to dev.somedomain.com). ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.