[GH-ISSUE #289] Error: Undefined Fn mime_content_type() #208

Closed
opened 2026-02-26 02:32:26 +03:00 by kerem · 4 comments
Owner

Originally created by @vishalkrv on GitHub (Mar 29, 2016).
Original GitHub issue: https://github.com/koel/koel/issues/289

Hi,

I was successfully able to setup Koel on my server(centos-release-6-7.el6.centos.12.3.x86_64) however it fails to play a song and gives me error in my console as Failed to load resource: the server responded with a status of 500 (Internal Server Error) with a link. When I open the link in a different page, I get this error FatalErrorException in SongController.php line 23:
Call to undefined function App\Http\Controllers\API\mime_content_type()
. Similar error was found in laravel.log file as well. The file which I'm trying to play is a mp3.

Hey, thanks for contributing to Koel! To save time for both of us, please make sure these checkboxes are checked before submitting the issue:

  • You have read and followed closely the Wiki, Upgrade Guide, as well as Troubleshooting
  • The issue has not been reported before
  • This is not a "how to install on Windows" or "why is my npm messed up" question
  • You're a cool person

All checked? Now also make your issue

  • Is associated with a version. Or better yet, a commit.
  • Is as detailed as possible (ahem... OS, browser, steps to reproduce, maybe?)
  • Includes the error output if it's a bug/error report ("Whoops!" is not very helpful, you know)
  • Is in English, 因为我不说中文。
Originally created by @vishalkrv on GitHub (Mar 29, 2016). Original GitHub issue: https://github.com/koel/koel/issues/289 Hi, I was successfully able to setup Koel on my server(**centos-release-6-7.el6.centos.12.3.x86_64**) however it fails to play a song and gives me error in my console as **Failed to load resource: the server responded with a status of 500 (Internal Server Error)** with a link. When I open the link in a different page, I get this error **FatalErrorException in SongController.php line 23: Call to undefined function App\Http\Controllers\API\mime_content_type()** . Similar error was found in laravel.log file as well. The file which I'm trying to play is a mp3. # Hey, thanks for contributing to Koel! To save time for both of us, please make sure these checkboxes are checked before submitting the issue: - [x] You have read and followed closely the [Wiki](https://github.com/phanan/koel/wiki), [Upgrade Guide](https://github.com/phanan/koel/releases), as well as [Troubleshooting](https://github.com/phanan/koel/wiki/Troubleshooting) - [x] The issue has not been reported before - [x] This is not a "how to install on Windows" or "why is my npm messed up" question - [x] You're a cool person All checked? Now also make your issue - [ ] Is associated with a version. Or better yet, a commit. - [ ] Is as detailed as possible (ahem... OS, browser, steps to reproduce, maybe?) - [ ] Includes the error output if it's a bug/error report ("Whoops!" is not very helpful, you know) - [x] Is in English, 因为我不说中文。
kerem closed this issue 2026-02-26 02:32:26 +03:00
Author
Owner

@phanan commented on GitHub (Mar 29, 2016):

mime_content_type() has been deprecated. I'll remove this in the next version of Koel. Meanwhile you can enable mime_magic in your php.ini file for the functionality.

<!-- gh-comment-id:202940468 --> @phanan commented on GitHub (Mar 29, 2016): `mime_content_type()` has been deprecated. I'll remove this in the next version of Koel. Meanwhile you can enable `mime_magic` in your `php.ini` file for the functionality.
Author
Owner

@phanan commented on GitHub (Mar 29, 2016):

Oh, actually the function is not deprecated anymore, and is still well supported by PHP 7. I'll suggest you to look at your PHP installation then.

<!-- gh-comment-id:202943175 --> @phanan commented on GitHub (Mar 29, 2016): Oh, actually the function is not deprecated anymore, and is still well supported by PHP 7. I'll suggest you to look at your PHP installation then.
Author
Owner

@thallian commented on GitHub (Mar 30, 2016):

If this is still a concern I'd take a look if you have the php fileinfo shared extension installed (the mime_content_type function lives there).

<!-- gh-comment-id:203418287 --> @thallian commented on GitHub (Mar 30, 2016): If this is still a concern I'd take a look if you have the php fileinfo shared extension installed (the `mime_content_type` function lives there).
Author
Owner

@vishalkrv commented on GitHub (Mar 31, 2016):

Still in talks my hosting provider, mime_content_type and fileinfo both are disabled on my server.

<!-- gh-comment-id:203706647 --> @vishalkrv commented on GitHub (Mar 31, 2016): Still in talks my hosting provider, mime_content_type and fileinfo both are disabled on my server.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#208
No description provided.