mp3 file uploads elgg 1.7.15

Hello all I have a issue with mp3 files not displaying as mp3 music but instead it displays as a document.

I have seen a few disussions about this on the site but I feel my problem is a bit diffrent.

Heres my findings

I have installed elgg 1.7.15 on a dedicated server and uploaded mp3s, the files were visible as mp3 music and I was able to listen to them via aaudio wiget.

I install elgg 1.7.15 same as above onto a shared server with unlimited storage space and bandwidth but when I upload mp3s this time the file icon displays as a document.

Furthermore I decided to clone the original installation from the dedicated server onto the shared server just as a procation in case it was something that I did wrong. After installing the clone on the shared server I checked the files and vollah it was still displaying the mp3 as a music file at this point I thought it was sorted but little did I know when I uploaded another mp3 it started displaying the file as a document again.

Can anyone tell what the cause of this issue is or does anyone else have this problem.




  • Take a look at detectMimeType() in ElggFile.php. I think a server has a file that defines the mimetypes that it understands. It's less likely that a shared hoster has that configured.

  • Thanks cash but thats a bit advanced for me.

  • Huray! I have now sorted this problem.

    Although the server was running php 5.3x the PHP was somehow set to version 5.2 in the ~/.htaccess

    after changing this in .htaccess uploaded files started appearing as mp3 music files and am able to listen on site with aaudio.

    Just like to thank iionly and cash for you help Thanks Guys!


Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking