Support » Fixing WordPress » PDF Upload failing

  • Resolved Warren Harrison

    (@hungrymedia)


    I am unable to upload PDFs (images work with no problem) via the media uploader. The upload occurs, the file does get uploaded to the server, but the file never displays in the media library.

    In the Apache log file I see the following errors:
    – PHP Warning: array_keys(): The first argument should be an array in /sites/wp-includes/post.php on line 2568
    – PHP Warning: asort() expects parameter 1 to be an array, null given in /sites/wp-includes/post.php on line 952

    Oddly, this exact same WordPress installation works with no problem on a different server. Both are running PHP 5.2.6

    Anyone with ideas?

Viewing 4 replies - 1 through 4 (of 4 total)
  • but the file never displays in the media library.

    Mine didn’t show it either until I realized that by default it displays only the images – I had to click an “All types” to see it.

    Thread Starter Warren Harrison

    (@hungrymedia)

    My apologies, I should have been more specific. I do see the uploaded PDFs listed under Manage > Media Library (but cannot edit their details). I do not see the PDFs in the media library accessed via the file uploader though, and therefore am unable to add them to posts.

    So, that fact that I cannot access/edit the details of uploaded PDFS (e.g. title) together with the PHP error messages tells me something is going wrong.

    Thread Starter Warren Harrison

    (@hungrymedia)

    My issue was resolved by re-downloading 2.6.2 and performing the upgrade again. It seems that the 2.6.2 files I previously downloaded had some older files mixed in.

    La M

    (@lady_moocher)

    Hi

    I’m confused, I successfully uploaded a pdf file to the media library, but when I add a media file to the post all I get is the pdf title as text, no link to a file.

    What is the process?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PDF Upload failing’ is closed to new replies.