How to stop Joomla Media Manager making your image names lowercase!

I recently developed a simple module that loaded in images automatically based off a folder/file structure in the images folder. The name of the file would dictate the caption underneath the image requiring names of files to be descriptive and capitalized correctly. I didn’t realise at the time I built this module that Media Manager converts all filenames to lowercase by default. I did a quick Google and found several people asking how to switch this off but no answers.

I needed to switch this off so I did some quick searches of the admin folder and found the answer.

Open the file:

If you do a search in the file for ‘strtolower’ you should find a line of code that looks like this:
(line 58 in the version of Joomla 1.5 I was working on)

$filepath = JPath::clean(COM_MEDIA_BASE.DS.$folder.DS.strtolower($file['name']));

Simply change this line to look like this:

$filepath = JPath::clean(COM_MEDIA_BASE.DS.$folder.DS.$file['name']);

And thats all there is to it. Now you can have any capitalization at all in your filenames.

DISCLAIMER: I strongly recommend not doing this as it is a core component, if you decided to do this as you have no option then at least make a note of it because next time you upgrade Joomla this change will more than likely be overridden.

PHP-FPM crashes using PHP 5.3.6 with Nginx

I recently spent a few hours smashing my head against my keyboard trying to figure out why PHP-FPM was dying every time I tried to load my favourite framework. The cause ended up being APC. Versions 3.1.9 and 3.1.8 don’t work properly with PHP 5.3.6 on Ubuntu 10.04 and Debian 6. I had to use APC 3.1.6 to get it to compile without errors.

Hope this saves someone an hour or two.