sorry for spamming, but it's because of precedence
http://no2.php.net/manual/en/languag...ors.precedence
"Jørn-Inge Kristiansen" <jorninge@stud.ntnu.no> wrote in message
news:blcrkq$1a1$1@tyfon.itea.ntnu.no...[color=blue]
> and it worked with or instead of || too
>
> don't ask my why, it just did ;)
>
> "Jørn-Inge Kristiansen" <jorninge@stud.ntnu.no> wrote in message
> news:blcrin$19l$1@tyfon.itea.ntnu.no...[color=green]
> > it worked fine when I removed the "|| die("failed...") part though
> >
> >
> > "Darren Gamble" <darren@enchantress.ca> wrote in message
> > news:pan.2003.09.30.20.52.10.359779@enchantress.ca ...[color=darkred]
> > > Good day,
> > >
> > > I've sent a message on this to the php-general list already, but
> > > unfortunately no one replied. Sorry for the repost. to those that[/color][/color][/color]
read[color=blue][color=green][color=darkred]
> > > both...
> > >
> > > I'm having a problem working with an image that I've made with
> > > imagecreatefromjpeg. Here's the code:
> > >
> > >
> > > $in_file = "IMG_0050.jpg";
> > > echo "Testing for image ".$in_file."<BR />\n"; $image =
> > > imagecreatefromjpeg($in_file) || die("Failed to create image from[/color][/color][/color]
file.[color=blue][color=green][color=darkred]
> > > <BR>\n");
> > > echo "Resource ID: ".$image."<BR>\n"; echo "Image width:
> > > ".imagesx($image)."<BR>\n";
> > >
> > >
> > > It reads in the file OK and prints out "1" as the Resource ID, as
> > > expected. However, imagesx fails with:
> > >
> > > imagesx(): supplied argument is not a valid Image resource in
> > > <the_program_location> on line 9
> > >
> > >
> > > The resource ID was returned from imagecreatefromjpeg, so, I have no[/color][/color]
> idea[color=green][color=darkred]
> > > why it's "not valid". The image in question displays fine in Mozilla,
> > > etc, if that matters at all- and it's also a fairly large image, if[/color][/color][/color]
that[color=blue][color=green][color=darkred]
> > > matters at all too. Other PHP functions that work with the image[/color][/color]
> resource[color=green][color=darkred]
> > > fail in the same way.
> > >
> > > This is on 4.3.3 / FreeBSD 5.1, built from the ports collection . I[/color][/color]
> have[color=green][color=darkred]
> > > also tried this on Red Hat 9, with a similar failure.
> > >
> > > I've tried it on random images off of the web too, with no success.
> > >
> > > Here's my phpinfo()'s configure:
> > >
> > > './configure' '--enable-versioning' '--enable-memory-limit'
> > > '--with-layout=GNU' '--with-zlib-dir=/usr' '--disable-all'
> > > '--with-regex=php' '--disable-cli' '--with-apxs2=/usr/local/sbin/apxs'
> > > '--with-bz2=/usr' '--enable-calendar' '--enable-ctype'
> > > '--with-curl=/usr/local' '--enable-dba' '--with-dom=/usr/local'
> > > '--with-dom-xslt=/usr/local' '--with-dom-exslt=/usr/local'[/color][/color]
> '--enable-exif'[color=green][color=darkred]
> > > '--enable-ftp' '--with-gd' '--enable-gd-native-ttf'[/color][/color]
> '--enable-gd-jis-conv'[color=green][color=darkred]
> > > '--with-freetype-dir=/usr/local' '--with-jpeg-dir=/usr/local'
> > > '--with-png-dir=/usr/local' '--with-xpm-dir=/usr/local'
> > > '--with-gdbm=/usr/local' '--with-gettext=/usr/local'
> > > '--with-iconv=/usr/local' '--with-imap=/usr/local'
> > > '--with-imap-ssl=/usr/local' '--with-inifile' '--enable-mbstring'
> > > '--enable-mbregex' '--with-mcal=/usr/local' '--with-mcrypt=/usr/local'
> > > '--with-mhash=/usr/local'[/color][/color][/color]
'--with-mime-magic=/usr/share/misc/magic.mime'[color=blue][color=green][color=darkred]
> > > '--with-mysql=/usr/local' '--with-ncurses=/usr'[/color][/color][/color]
'--with-ldap=/usr/local'[color=blue][color=green][color=darkred]
> > > '--with-openssl=/usr' '--enable-overload' '--with-pcre-regex=yes'
> > > '--enable-posix' '--with-pspell=/usr/local' '--with-readline'
> > > '--enable-session' '--enable-sockets' '--enable-tokenizer'[/color][/color]
> '--enable-xml'[color=green][color=darkred]
> > > '--with-expat-dir=/usr/local' '--with-xmlrpc' '--enable-xslt'
> > > '--with-xslt-sablot=/usr/local' '--with-zip=/usr/local'[/color][/color]
> '--with-zlib=yes'[color=green][color=darkred]
> > > '--prefix=/usr/local' 'i386-portbld-freebsd5.1'
> > >
> > >
> > > I have a feeling that I am missing something simple, but I don't know[/color][/color]
> what[color=green][color=darkred]
> > > it could be. I didn't find anything in the mailing list archives, and
> > > Googling for the error message just shows pages and pages of actual[/color][/color]
> broken[color=green][color=darkred]
> > > web pages.
> > >
> > > Is this a bug?
> > >
> > > Thanks in advance for any help,
> > >
> > > - Darren -[/color]
> >
> >[/color]
>
>[/color]