Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #734964

    Being using Enfold on site for about 3 years. Currently running 3.8.1. Within the last couple weeks or so, no longer able to upload PDFs: “Sorry, this file type is not permitted for security reasons.” File sizes are well under maximum. Also in Media, found this Warning: finfo_open() expects parameter 1 to be long, string given in /hsphere/local/home/XXXXXXX/wp-includes/functions.php on line 2325 Warning ….. not valid file_info resource in XXXXX/functions.php on line 2326…”

    I added ‘image/pdf’ => ‘pdf’ to the array, but that did not help, so I removed it again.

    #734972
    #735022

    Thank you for the link. I added this code to the functions.php file via the WP backend Editor:

    <?php

    /*
    * Enfold Child theme functions file
    */

    function my_myme_types($mime_types){
    $mime_types[‘pdf’] = ‘application/pdf’; //Adding pdf extension
    return $mime_types;
    }
    add_filter(‘upload_mimes’, ‘my_myme_types’, 1, 1);

    ?>

    but am still getting this warning:
    Warning: finfo_open() expects parameter 1 to be long, string given in /hsphere/local/XXX/wp-includes/functions.php on line 2325 Warning: finfo_file(): supplied argument is not a valid file_info resource in /hsphere/local/XXX/wp-includes/functions.php on line 2326 Warning: finfo_close(): supplied argument is not a valid file_info resource in /hsphere/local/XXX/wp-includes/functions.php on line 2327
    Dismiss“XXX.pdf” has failed to upload.
    Sorry, this file type is not permitted for security reasons.

    • This reply was modified 7 years, 2 months ago by umeworks.
    #735024

    Can you check your server and see what version of PHP is installed?

    #735063

    5.2.17 version. I can ask my hosting to switch it to 5.3.29, 5.4.45 or 5.5.33 if you think that will help. Will await your advice.

    #735068

    According to this page (https://wordpress.org/about/requirements/) the minimum version is 5.2.4 or greater. Perhaps this is the issue.

    Note: If you are in a legacy environment where you only have older PHP or MySQL versions, WordPress also works with PHP 5.2.4+ and MySQL 5.0+, but these versions have reached official End Of Life and as such may expose your site to security vulnerabilities.

    #735078

    Do you have a specific recommendation which of these I should upgrade to?
    5.3.29, 5.4.45 or 5.5.33

    #735127

    Sorry, I really don’t. You might ask your hosting company if you can change back and forth between the versions. If so, I would try 5.5.33 since it’s the latest and then downgrade if you have any issues.

    #735151

    Hi,

    Thanks again for helping out @kevinmcgillivray :-)

    Did you try upgrading the PHP version and did you have any luck with it @umeworks?

    Best regards,
    Rikard

    #735158

    Happy to help, Rikard. I’m hoping to get an answer to one of my issues so I thought I’d help clear your plate a bit with some easy answers. :-D

    #735567

    Updated to PHP 5.3 and now resolved. Thank you.

    #735570

    That’s great! Glad it worked out for you.

    #736300

    Hi umeworks,

    Glad that it’s fixed.


    @kevinmcgillivray
    : Thanks for helping out. :)

    Best regards,
    Nikko

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.