Tutorials
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOtherTutorials

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #16  
Old December 26th, 2003, 03:43 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Image Gallery restrictions

I am experiencing the exact same problems, no thumbnails. clicking the little red x's brings up the full image. Tried all the fixes in all the threads concerning this tutorial with the same result. Red x's instead of thumbnails.

Greg

Reply With Quote
  #17  
Old January 1st, 2004, 10:04 AM
something_ something_ is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 1 something_ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Image Gallery restrictions

I'm having the same problem. The images comes up as broken thumbnails. Does the imgsrc.php ever gets run? I removed it just to test. The code still run without errors and produces the same output.

p.s. The GD test works for me (The one your posted earlier for someone else).

Reply With Quote
  #18  
Old January 2nd, 2004, 02:47 PM
notepad notepad is offline
Codewalkers Loyal (3000 - 3499 posts)
 
Join Date: Apr 2007
Location: Central, IL USA
Posts: 3,214 notepad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via AIM to notepad
RE: Image Gallery restrictions

post a link to your php info plz. i'm pretty sure the only people having problems now are people that are running this thing on their local machines.

Reply With Quote
  #19  
Old January 5th, 2004, 12:47 AM
notepad notepad is offline
Codewalkers Loyal (3000 - 3499 posts)
 
Join Date: Apr 2007
Location: Central, IL USA
Posts: 3,214 notepad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via AIM to notepad
RE: Image Gallery restrictions

okay something_'s problem was solved, turned out the images were too large for the specified memory limit in his php.ini file.

Reply With Quote
  #20  
Old January 8th, 2004, 02:52 PM
vr6stress vr6stress is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: utah
Posts: 3 vr6stress User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to vr6stress Send a message via Yahoo to vr6stress
RE: Image Gallery restrictions

i'm having the problem also and it's not being done on a local machine (though i ran into the same problem on my local machine too) dead thumbs...

this is my phpinfo here

the files are in the same directory, and link to a folder inside this directory....

so the image.php file is here

this is my config.php
php Code:
Original - php Code
  1.  
  2. <?php
  3.  
  4. // main images directory
  5. define('PATH', '/home/jmerch74/public_html/site_images/current_thumbs/');
  6.  
  7. // valid file mime types, all other files will be ignored
  8. define('TYPE', serialize(array('image/jpg', 'image/jpeg', 'image/pjpeg')));
  9.  
  10. // how many rows of images to display per page
  11. define('ROWS', 3);
  12.  
  13. // how many columns of images to display per page
  14. define('COLS', 5);
  15.  
  16. // maximum thumbnail width
  17. define('THMBWIDTH', 100);
  18.  
  19. // maximum thumbnail height
  20. define('THMBHEIGHT', 100);
  21.  
  22. ?> 


and i would really like some help on this...

Reply With Quote
  #21  
Old January 8th, 2004, 03:15 PM
notepad notepad is offline
Codewalkers Loyal (3000 - 3499 posts)
 
Join Date: Apr 2007
Location: Central, IL USA
Posts: 3,214 notepad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via AIM to notepad
RE: Image Gallery restrictions

did you modify the imgsrc.php script at all? because calling it seperately gives me an error on line 10. or maybe you've got some white space somewhere, sending content when it shouldn't be

Reply With Quote
  #22  
Old January 8th, 2004, 03:23 PM
vr6stress vr6stress is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: utah
Posts: 3 vr6stress User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to vr6stress Send a message via Yahoo to vr6stress
RE: Image Gallery restrictions

this is what i have for it..

php Code:
Original - php Code
  1.  
  2. <?php
  3.  
  4. require_once('config.php');
  5.  
  6. $src = isset($_REQUEST['src']) ? urldecode($_REQUEST['src']) : null;
  7.  
  8. // we're using file_exists here to prevent working with remote files
  9. if(isset($src) && file_exists($src))
  10. {
  11.     header('Content-Type: image/jpeg');
  12.  
  13.     list($width, $height, $type, $attr) = getimagesize($src);
  14.     $img = imagecreatefromjpeg($src);
  15.     $lowest = min(THMBWIDTH / $width, THMBHEIGHT / $height);
  16.  
  17.     if($lowest < 1)
  18.     {
  19.     $smallwidth = floor($lowest*$width);
  20.     $smallheight = floor($lowest*$height);
  21.     $tmp = imagecreatetruecolor($smallwidth, $smallheight);
  22.     imagecopyresized($tmp, $img, 0, 0, 0, 0, $smallwidth, $smallheight, $width, $height);
  23.     imagedestroy($img);
  24.     $img = $tmp;
  25.     }
  26.     imagejpeg($img, '', 100);
  27.     imagedestroy($img);
  28. }
  29.  
  30. ?>


wow, very nice response time...very appreciated!!!!

Reply With Quote
  #23  
Old January 8th, 2004, 04:17 PM
notepad notepad is offline
Codewalkers Loyal (3000 - 3499 posts)
 
Join Date: Apr 2007
Location: Central, IL USA
Posts: 3,214 notepad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via AIM to notepad
RE: Image Gallery restrictions

it looks fine.. somewhere you're sending content where you're not supposed to be because it says headers are already being sent. make sure that you don't have any white space at the top or bottom of your scripts, before/after the starting/ending PHP tags. know what i mean?

Reply With Quote
  #24  
Old January 8th, 2004, 04:28 PM
vr6stress vr6stress is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: utah
Posts: 3 vr6stress User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to vr6stress Send a message via Yahoo to vr6stress
RE: Image Gallery restrictions

yep went through and took it all out...

i no longer get any errors with the imgsrc.php but the thumbs are still dead...


Reply With Quote
  #25  
Old January 8th, 2004, 04:46 PM
notepad notepad is offline
Codewalkers Loyal (3000 - 3499 posts)
 
Join Date: Apr 2007
Location: Central, IL USA
Posts: 3,214 notepad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via AIM to notepad
RE: Image Gallery restrictions

it's still showing the same error, headers already sent. e-mail me all three of your scripts exactly as you're running them so i can look closer, just attach them.

please note that i can't execute code on this PC so it could be a while before i reply

Reply With Quote
  #26  
Old January 8th, 2004, 05:30 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Image Gallery restrictions

mail has been sent...

Reply With Quote
  #27  
Old February 14th, 2004, 11:28 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Image Gallery restrictions

Godamm PHP, thanks Notepad for that White Space tip there. I had 1 SPACE after the ?> in config.php. I too was also ripping my hair out at this one with few results to whichever tip i tried.

(note to self: stick with ASP)

Gamekeeper

http://www.megaquiz.co.uk


Reply With Quote
Reply

Viewing: Codewalkers ForumsOtherTutorials > Image Gallery restrictions


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:
<