Re: getimagesize???
by "Keith Sellars" <Keith(at)webgraffix.com>
|
| Date: |
Tue, 15 Oct 2002 08:04:17 -0400 |
| To: |
<hwg-languages(at)hwg.org> |
| References: |
S0026260871 rr |
| |
todo: View
Thread,
Original
|
|
Figured it out. I've corrected it, but it brings up a related question.
We were checking for the existence of an image with an "if" statement:
if ($image[$i] != 'none') {
However, unless the word "none" is a valid expression to check for a null
value, that was the culprit. I replaced the above line with:
if ($image[$i] != '') {
... and now it works like a charm. My question is this: How could it have
worked before at all? "none" is not a valid expression to check for a null
value is it? I spent 8 hours trying to track this down thinking it was
possibly a server issue with the getimagesize function, went to bed, got up
at 4 a.m. and had it fixed in about 15 minutes.
(Jeff, to answer your question, no I did not remove the file name, it was
blank as it should have been. That fact was what led me to know that the if
statement was somehow the culprit).
Thanks,
Keith D Sellars
WebGraffix
www.webgraffix.com
"Making database sites seem easy"
----- Original Message -----
From: "Data Driven Design" <datadriv(at)datadrivendesign.com>
To: "Keith Sellars" <Keith(at)webgraffix.com>; <hwg-languages(at)hwg.org>
Sent: Tuesday, October 15, 2002 7:58 AM
Subject: Re: getimagesize???
> Warning: getimagesize: Unable to open '' for reading. in
> /usr/www/users/chchpd/webadmin/modPage.php on line 32
>
> Is the filename missing from the error message, or did you remove it for
> posting here?
>
> If the former, the error is caused because getimagesize() didn't find the
> image. Got a snippet of code to look at?
>
> Regards,
>
> Jeff Rossi
>
> Data Driven Design
> 1506 Tuscaloosa Ave
> Holly Hill, Florida 32117
> http://www.datadrivendesign.com
> ----- Original Message -----
> From: Keith Sellars <Keith(at)webgraffix.com>
> To: <hwg-languages(at)hwg.org>
> Sent: Monday, October 14, 2002 9:58 PM
> Subject: getimagesize???
>
>
> > OK, one day after I stated on another list that I hadn't had any
problems
> > with the conversion to php 4 on our servers, here comes this one. (I'm
> not
> > sure if it's related to a new version of php or not...)
> >
> > Suddenly out of the blue I'm getting an error relating to the
getImageSize
> > function on one of my sites. The error states:
> > Warning: getimagesize: Unable to open '' for reading. in
> > /usr/www/users/chchpd/webadmin/modPage.php on line 32
> >
> > The really weird thing is that I haven't touched this script in MONTHS.
> I'm
> > pulling my hair out (what little bit is left) trying to figure this out.
> > Does anyone have any idea what may have caused this script to suddenly
> stop
> > working? The getimagesize function is still a valid function according
to
> > the mysql manual, it just doesn't support gif images anymore. Almost
ALL
> of
> > my images are jpg though so that's not the issue. It looks as if it's
> > trying to open a file but can't, but even in cases where there is no
image
> > for it to try to open it does this. (We have "if" statements that check
> for
> > the existence of an image). As I said, the scripts haven't been touched
> in
> > months and suddenly stopped working.
> >
> > ANY help or ideas would be appreciated...
> >
> > Thanks,
> > Keith D Sellars
> > WebGraffix
> > www.webgraffix.com
> >
> > "Making database sites seem easy"
> >
> >
> >
>
>
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.