Call to undefined function DataTables\Editor\finfo_open()
Call to undefined function DataTables\Editor\finfo_open()
aarontharker
Posts: 41Questions: 11Answers: 0
in Editor
When trying to get the mime types for file uploads working I am getting this message. I am running php 5.6 so any idea what maybe causing this?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
In the
php/Editor/Upload.php
file you will be able to find:Changing that to be:
I think should resolve it.
Could you give me the full version string for your PHP install please? I'd expected this to be a very early 5.3 release from the error message you are seeing. I'm really surprised to see it in 5.6.
Allan
The error message I'm getting is
I added the preceding backslash as you suggested and it hasn't changed anything. This is running on PHP 7.1.
I replaced the function in that file with
mime_content_type()
and that doesn't work either! That function is also not found on my PHP server, for whatever reason.I created an independent file with only
<?php > ```` And this has a fatal error, indicating that the necessary functions don't exist on my server's installation of PHP. ?>````
<?php
echo mime_content_type("info.php");
It turns out that Dreamhost doesn't include the correct extension by default, so I needed to add
extension=fileinfo.so
to myphp.ini
file.It sounds like the Dreamhost PHP might be a bit limited.
mime_content_info
is a core part of PHP. It might be worth asking Dreamhost about that.Allan