Jump to content

Recommended Posts

Hello, I posted this issue in php coding board, but I think this really is an Apache issue. 

 

Here is my issue:

I have created a social poker site and there is a PHP script that makes thumbnails from the members' photo.  It does fine for all image types .jpg, .jpeg, .png and .gif.  However, if a file has been uploaded with the extension .JPG, it does not show up.  I was under the impression that regardless of the jpg extension the MIME type should be the same.  I went through and changed all of the .JPG extensions to .jpg but the photos still aren't displaying.

 

I read somewhere that Apache is case-sensitive in treating filenames and extensions.  I'm a designer and amateur developer, but don't have much knowledge about Apache other than running MAMP and doing some minor .htaccess stuff.  Does anyone know how to do this?  I think I read something about mod rewrite?  Any help would be greatly appreciated!

I read somewhere that Apache is case-sensitive in treating filenames and extensions.

 

What if someone uploaded image.EXE? Then we'd be messed.

 

Using something such as stristr or strtolower on the extension is good practise, as regardless of case that is all you're needing to work with, the letters not the case.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.