|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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)); |
|
#3
|
|||
|
|||
|
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 |
![]() |
| Viewing: Codewalkers Forums > Other > Tutorials > Display problem with Notepad's Image Gallery |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|