justinbeeler Posted March 18, 2010 Share Posted March 18, 2010 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! Quote Link to comment https://forums.phpfreaks.com/topic/195696-force-apached-to-treat-jpg-the-same-as-jpg/ Share on other sites More sharing options...
thewooleymammoth Posted March 19, 2010 Share Posted March 19, 2010 im pretty sure its a php issue. Try renaming the file you get with strtolower() Quote Link to comment https://forums.phpfreaks.com/topic/195696-force-apached-to-treat-jpg-the-same-as-jpg/#findComment-1028667 Share on other sites More sharing options...
oni-kun Posted March 20, 2010 Share Posted March 20, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/195696-force-apached-to-treat-jpg-the-same-as-jpg/#findComment-1028994 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.