image error

This is a discussion on "image error" within the PHP Forum section. This forum, and the thread "image error are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jun 10th, 2005, 14:59
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbacardi Send a message via Skype™ to benbacardi
image error

how can i stop my php displaying this error:

Warning: getimagesize(http://img.photobucket.com/albums/v3...cher/rottf.gif): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/httpd/vhosts/bpcu.co.uk/httpdocs/forum/viewtopic.php on line 189

sometimes it does it, sometimes it doesnt. the link is

http://www.bpcu.co.uk/forum/viewtopic.php?topicid=33

please be kind on the site - im 17 and its my first attempt at fully coding a forum!
Reply With Quote

  #2 (permalink)  
Old Jun 11th, 2005, 08:36
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Can you give us the code for line 189?

Is there any connection between when the error does and doesn't throw?

I refreshed the page a few times and couldn't get the error.
Reply With Quote
  #3 (permalink)  
Old Jun 11th, 2005, 19:33
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbacardi Send a message via Skype™ to benbacardi
there doesnt seem to be any connection - its just randomly.

and the code is...

Code: Select all
$size = getImageSize($minfo['avatar']);
[/code]
Reply With Quote
  #4 (permalink)  
Old Jun 11th, 2005, 22:29
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
I would expect there's some sort of problem accessing that URL - are you sure it's necessary? Does the site sometimes time out?
Reply With Quote
  #5 (permalink)  
Old Jun 12th, 2005, 08:37
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbacardi Send a message via Skype™ to benbacardi
theres no problem, because it still displays the picture below that error....

and i need that line of code so that i can resize the image if it's above 140px wide...
Reply With Quote
  #6 (permalink)  
Old Jun 13th, 2005, 08:39
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbacardi Send a message via Skype™ to benbacardi
does anyone know? its makes my forum look ugly lol

and i dont know any other way of restricting the size of user's avatars
Reply With Quote
  #7 (permalink)  
Old Jun 13th, 2005, 17:41
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Oh I see, this is for avatars? PHPBB uploads a user's image to the site's webspace and only allows the image to be used if it's the correct width, etc. That way you don't rely on an external site to give you an image and you don't have to check the width of the image every time it's displayed...
Reply With Quote
  #8 (permalink)  
Old Jun 13th, 2005, 18:40
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbacardi Send a message via Skype™ to benbacardi
does phpbb resize the image before saving it?

and how can i upload images? ive tried a few scripts and i cant get any to work with my forum... what i would like to do, is upload the image, resize it to 140px wide, but only if it is bigger already, and then save it to an avatars/ folder with the username as its filename ... (that would be to ensure there are not two avatars of the same name) any help would be v. gratefully recieved
Reply With Quote
  #9 (permalink)  
Old Jun 13th, 2005, 23:35
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
phpbb does not resize the image, it simply refuses any images that are too large.
Reply With Quote
  #10 (permalink)  
Old Jun 14th, 2005, 18:49
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbacardi Send a message via Skype™ to benbacardi
thanks sirkent - do you know where i can find a v. simple easy to customise upload and rename script?
Reply With Quote
  #11 (permalink)  
Old Jun 15th, 2005, 11:17
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Google is your friend! I don't know off the top of my head...
Reply With Quote
Reply

Tags
image, error

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Getting the "Microsoft JET Database Engine error '80040e14'" error. VegaLA Classic ASP 3 Jan 26th, 2008 00:12
Keep getting error message Microsoft VBScript runtime error '800a01a8' cpando1974 Classic ASP 2 Aug 7th, 2007 12:00
Error 500 - Internal server error JasonStanley PHP Forum 3 Apr 23rd, 2007 17:56
Simple CSS Error. Please Help (Padded Border Around Image) tharshan Web Page Design 4 Mar 11th, 2007 00:37


All times are GMT. The time now is 05:14.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43