Menu

Cannot add attachment - Server Error 500

Help
2013-05-24
2013-05-30
  • Andrew Gustar

    Andrew Gustar - 2013-05-24

    I am trying to add a (small) pdf attachment to an entry in Wikindx. After pressing 'save' on the 'File Attachments Edit' screen I get the following error (in Chrome):

    'The website encountered an error while retrieving http://hpdesktop/wikindx4/index.php?action=attachments_ATTACHMENTS_CORE&function=editInit&resourceId=994. It may be down for maintenance or configured incorrectly.

    HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfil the request.'

    Refreshing takes me back to the 'File Attachments Edit' screen, but the file is not attached.

    I am running Wikindx 4.2.1 on a single PC using Wampserver 2.2 on windows 7. The same problem occurs with Internet Explorer or Chrome. This is the first attachment I have tried to add since upgrading to 4.2.1 - everything previously added is still there.

    Any suggestions on how I can resolve this would be very welcome!

    Many thanks

     
  • Mark Grimshaw

    Mark Grimshaw - 2013-05-24

    Hi Andrew,

    If it's on Windows 7, then I doubt it's anything to do with the permissions of the attachments folder.

    I've just checked I can upload an attachment in 4.2.1 (OSx XAMMP Firefox) and have no problem.

    1. This has happened since the upgrade? i.e. No problems with 4.1.9 or earlier?
    2. Have you moved the attachments folder in config.php? If so, what is $WIKINDX_ATTACHMENTS_DIR set to?
    3. Do you get any further error messages with error reporting turned on?

    Mark

     
  • Andrew Gustar

    Andrew Gustar - 2013-05-24

    Hi Mark

    Thanks for the error reporting tip. I turned it on and got the following message...

    ( ! ) SCREAM: Error suppression ignored for
    ( ! ) Fatal error: Class 'finfo' not found in C:\wamp\www\wikindx4\core\file\FILE.php on line 73
    Call Stack
    Time Memory Function Location
    1 0.0029 176824 {main}( ) ..\index.php:0
    2 0.2133 3223024 ATTACHMENTS->init( ) ..\index.php:188
    3 0.2155 3233512 ATTACHMENTS->add( ) ..\ATTACHMENTS.php:66
    4 0.2181 3259808 ATTACHMENTS->storeFile( ) ..\ATTACHMENTS.php:88
    5 0.2184 3260112 FILE->fileUpload( ) ..\ATTACHMENTS.php:279

    Following the trail a bit further, I discovered that the following was commented out in my php.ini file...

    extension=php_fileinfo.dll

    Deleting the offending semicolon has solved the problem. I'm not sure why this would be commented out by default, or why it has never been a problem before - presumably this module has not been used in previous releases.

    Anyway, problem solved and learning achieved! Thanks for your help

    Andrew

     

    Last edit: Andrew Gustar 2013-05-24
  • Mark Grimshaw

    Mark Grimshaw - 2013-05-30

    Glad to hear it's working Andrew.

    I'm not sure why that extension would be disabled. I try to ensure that wikindx works with vanilla PHP out-of_the-box and have no problem. finfo is enabled by default from v5.3.0 and up so are you using 5.2.9?

    Mark

     
  • Mark Grimshaw

    Mark Grimshaw - 2013-05-30

    (Apologies for the late response. I don't always get SF forum messages.)

     

Log in to post a comment.