PDA

View Full Version : Problem since PHP 4.3.1 upgrade


blulegend
26th of February 2003 (Wed), 08:18
Ever since my host upgraded to 4.3.1 the getimagesize function does not work with your code. Don't know why. Spent hours narrowing it down.

The function works with everything but the directories of my medium and small images.

I had to turn the error image setting to 1.

Have you had any similar problems?

Pekka
26th of February 2003 (Wed), 12:23
Thanks for reporting.
I installed 4.3.0 and it has that problem, too.

They changed something internal with that function in PHP 4.3:

"The difference is that we have a new streams abstraction layer which allows GetImageSize() to work which whatever can be treated as a file."

...and there are bug reports of its failure.
http://bugs.php.net/bug.php?id=21912&edit=1
http://bugs.php.net/bug.php?id=21676&edit=1

So if it's PHP bug I can't do anything about it...

Meanwhile PHP 4.3.x users should set misc settings' "When image file is not found" to 1.

Pekka
26th of February 2003 (Wed), 13:09
To go around this bug:

In photo.php change lines (around line 1200)


if ($s_imagecheckifthere=="1" OR $s_imagecheckifthere=="2") {
$sizetag = @getimagesize($url);
}



to




if ($s_imagecheckifthere=="1" OR $s_imagecheckifthere=="2") {
$sizetag = @getimagesize($url,$info);
}

blulegend
26th of February 2003 (Wed), 16:39
Great. I thought it was my host having problems with the server.

Your workaround worked!

I too found one of those bug reports and asked my host to upgrade to the latest CVS.