Attachments not working - Error 500

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
Posts: 2
Joined: 28 Feb 2020, 08:55

Attachments not working - Error 500

Post by RLight1 »

When users are adding attachments to their posts they are met with "HTTP ERROR 500" Server unable to handle this request.
I have set up a directory in the root of C: and entered this into the "Upload file path" under "Edit project" the file path is as follows C:\temp\
I can see files in this directory see attachment "tempupload"

My config_inc.php section for the attachments is as the following

--- Attachments / File Uploads ---
$g_allow_file_upload = ON;
$g_file_upload_method = DISK;
$g_absolute_path_default_upload_folder = 'C:\temp\'; # used with DISK, must contain trailing \ or /.
$g_max_file_size = 5000000; # in bytes
$g_preview_attachments_inline_max_size = 256 * 1024;
$g_allowed_files = 'jpg,txt,png'; # extensions comma separated, e.g. 'php,html,java,exe,pl'
$g_disallowed_files = ''; # extensions comma separated
(Note that "$g_absolute_path_default_upload_folder" is disabled in the above. If I enable it then I am no longer able to access the site)

See attachment "Check" For results

I am now stuck on how to get the attachments working and hope someone can see the fault. Please let me know if you require any further information from me.
Attachment.PNG (13.84 KiB) Viewed 3395 times
Check.PNG (36.71 KiB) Viewed 3395 times
tempupload.PNG (42.79 KiB) Viewed 3395 times
Posts: 3
Joined: 07 May 2020, 15:40

Re: Attachments not working - Error 500

Post by Sprezzatura »

I got it to work based on another post:

(from viewtopic.php?f=2&t=26088&p=67360&hilit ... 500#p67360)



If the error is:

Code: Select all

Fileinfo PHP extension is available to support file uploads
Ensure that the fileinfo extension is installed and enabled
Edit php.ini and uncomment this line:


Post Reply