OK, I am trying to setup a secure web form, so I want to have something that will allow me to accurately check the MIME type of the files being uploaded. My research has revealed that the best bet to do that is the fileinfo php extension. I have compiled the extension with the following:
After installing some dependencies I was able to get it to be compiled and recognized by pear and shows up when I list pear's installed packages. I have also added the following line to my php.ini file:
After some problems with getting the browser to figure out where the fileinfo.php file was, I copied it to the php root directory. I also enabled the dl() function. I get this error:
Code: Select all
Warning: dl() [function.dl]: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/fileinfo.so' - /usr/lib/php5/20060613+lfs/fileinfo.so: cannot open shared object file: No such file or directory in /usr/share/php/fileinfo.php on line 3
fileinfo extension is not avaliable, please compile it.
What I'm particularly concerned with is the "fileinfo extension is not avaliable, please compile it." line. This has been showing up in the last few error messages, and I don't know what to do. I tried installing fileinfo from source, but I get this error:
Code: Select all
/usr/local/src/Fileinfo-1.0.3/fileinfo.c:127:45: error: macro "ZEND_ME_MAPPING" requires 4 arguments, but only 3 given
I am at a loss as to what to do. Can anyone help me with this problem, or suggest some other means of checking the MIME type. I am about to blow a gasket over this!