1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

[solved] Error 500, can not find the cause

Discussion in 'Apache' started by postcd, Mar 9, 2018.

  1. #1
    Hello,

    i am unable to discover what is causing Error 500 when i try to upload file using some PHP script (i tried multiple content management systems and scripts and all fails with error 500 or not upload anything.

    The server is Apache 2.x and PHP 5.x
    I know where is global php.ini and httpd.conf but do not know what to look for.

    Please can you advise which php/httpd configuration variables to check?

    UPDATE: ISSUE SOLVED:
    the server admin have to check global error_log file. On my server was in:
    And i found:
    ModSecurity: Input filter: Failed to delete temporary file: /root/tmp/**
    After some googling, what helped was to insert:
    SecUploadDir /tmp
    SecTmpDir /tmp
    to the bottom of the file:
    /usr/local/apache/conf/modsec2.user.conf
    If that file does not exist, probably one have to use other *.user.conf file of the mod security.
    Maybe httpd restart is needed.

    --- By the way following is how i wasted time trying to find cause of the 500 error --
    - tried to replace the posting.php and a few other files that seemingly was included/required by that script by original from developer website
    - checked ModSecurity denied log
    - tried to renamed .htaccess files that i thought may cause the issue
    - found no php.ini files
    - tried to empty disable_functions variable on the server and checked the global php.ini does not contain any rule for that web user
    - tried to upload different file type on different page
    - checked all error_log files after enabling debug mode via config.php file and resubmitting the file upload form.
    - checked scripts and folder for uploading of new files and they appear to have correct permissions
     
    Last edited: Mar 9, 2018
    postcd, Mar 9, 2018 IP
  2. AlphaNine_Vini

    AlphaNine_Vini Active Member

    Messages:
    218
    Likes Received:
    10
    Best Answers:
    1
    Trophy Points:
    88
    #2
    Try changing the php version
     
    AlphaNine_Vini, Apr 2, 2018 IP