Displaying jpeg files through apache server
Moderator: General Moderators
Displaying jpeg files through apache server
Hi having a very strange problem, have had apache set up with mysql and php for a couple of weeks now in order to learn php databasing etc, thought everything was working fine, managed to make a few complicated(ish) scripts which run correctly. The problem came when I tried to dispaly jpeg files. Some wern't being recognised at all. Large ones were not completely drawing. One thing I have noticed is that the ones that don't draw at all have all been taking by digital cameras of varying names.
I'm confused, anyone have any ideas?
Thanks Ben
I'm confused, anyone have any ideas?
Thanks Ben
as in permissions on the files. The web user needs to have read permissions on the files.
you'll use chmod to change file permissions.
you can determine the files' permissions by changing the the directory they're in and using 'ls -la'
you'll use chmod to change file permissions.
you can determine the files' permissions by changing the the directory they're in and using 'ls -la'
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
What I would do is save your jpeg files as GIF and PNG (yes, both types) then try running your app with those images instead of JPEG images (as a benchmark). Next, I would load a static HTML page with images in them (all three types of images) and run them from the localhost to test if this is truly an apache thing or not.
tried the different types, ie the 3 mentioned, having converted them (the files which wern't loading) they do load, but only to a size limit (this is under the size of a 1024 by 768 wallpaper) Its loads the top up to a certain point (not totally sure what size this is) but fails to get all the way down the image, resulting in black towards the bottom.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Now load them in your browser directly (File -> Open -> <filename_of_image>. Does that change the behavior?
@Burr = I would tend to agree with except that the poster is on a Windows machine. Typically this results in open permissions by default. I'm not counting permissions out, I'm just thinking it might be something else.
@Burr = I would tend to agree with except that the poster is on a Windows machine. Typically this results in open permissions by default. I'm not counting permissions out, I'm just thinking it might be something else.
ok, so they all draw partially now? If so, then the permissions issue is out the window.
can you open the images with your browser straight from the filesystem....in other words file:///...
that won't pass through your web server and will help eliminate that as a potential issue. Can you open the images with another application and do they work there? Is this happening with one browser type but not another?
edit: quick draw mcgraw everah...quick friggin' draw mcgraw.
can you open the images with your browser straight from the filesystem....in other words file:///...
that won't pass through your web server and will help eliminate that as a potential issue. Can you open the images with another application and do they work there? Is this happening with one browser type but not another?
edit: quick draw mcgraw everah...quick friggin' draw mcgraw.