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:
  #1  
Old May 16th, 2006, 02:02 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
Display problem with Notepad's Image Gallery

Hello!

First I'd like to thank you for this nice piece of code. Studying it was really interesting for the beginner I am.

But I've found a problem: The code works perfectly on my local server (EasyPHP) but some images do not show when uploaded to my provider's site. No errors provided: the 'alt' text appears instead of the image. I've not been able to found a pattern for this: size, format (GIF or JPEG), transparency or not, file name... Simply some images doesn't appear, neither as a thumbnail nor as a full image. And they're always the same ones. I've been playing with cache headers and usleep() in the middle of the draw_image function, but nothing to do...

Have you a clue about this?

Thanks in advance,
Juan

Reply With Quote
  #2  
Old May 16th, 2006, 02:56 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: Display problem with Notepad's Image Gallery

Update: Adding this header in the draw_image function makes that even in the local server some random images disappear. Reloading the page changes the images being affected... usleep() doesn't help.

header('Content-Length: '.filesize($src));

Reply With Quote
  #3  
Old May 16th, 2006, 07:52 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: Display problem with Notepad's Image Gallery

Well, I'm sorry, I should have debugged it better before adding all this updates.

I think I've found where the problem is, but I can't find a solution. I'm lost...

I've been experimenting with imgsrc.php and I've found that the 'src' parameter is the problem. I have two files, the same image in GIF format doesn't show in the remote server, if I convert it to JPEG it shows. Well. If I output all this:

echo $src;

$imgstring = file_get_contents($src);
echo $imgstring;

$img = imagecreatefromstring(file_get_contents($src));

I get the expected garbage for the JPG file but nothing for the GIF (always in the remote server).

Conclusion: the 'src' parameter doesn't get this:
/Partners/partners-ALSIA.gif
but get this:
/Partners/partners-ALSIA.jpg

I verified it with
echo echo $_REQUEST['src'];

But other GIF files pass through. It depends on the file. Incredible. The problem is in the remote server, but... where?

Really puzzled,
Juan


Reply With Quote
Reply

Viewing: Codewalkers ForumsOtherTutorials > Display problem with Notepad's Image Gallery


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT