Error 500 when trying upload file

Started by IgorS, March 27, 2024, 08:34:44 AM

Previous topic - Next topic



I am facing the same problem now.

You cannot view this attachment.

I was migrating from 2.0.19 to the latest 2.1.4 version today and after updating my PHP to 8.1 (which was required for some mods: Automatic Attachment Rotation (and Resize) and Post and PM Inline Attachments) I am not able to upload any attachments.

Those mods are required in my case, as old InLine Attachements mod which was integrated in 2.0.19 is not available for latest version.

When I am trying to downgrade PHP to 7.4, I need to uninstall those mods and even then, when opening my forum I am getting "Composer dependencies require a PHP version ">= 8.0.0"."

Any ideas?

- Default theme
- PHP 8.1
- SMF 2.1.4
- Some mods installed, like mentioned below:
You cannot view this attachment.

Aleksi "Lex" Kilpinen

Topic split from Error 500 when trying upload file

Have you checked to see what is logged in your server's error log when this happens? Every HTTP 500 should get logged.
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF


Do you mean Server WWW - Access logs from my hosting? I have checked it and found something like this:

[27/Mar/2024:14:35:48 +0100] "POST /index.php?action=uploadAttach;sa=add;acd64ec7=99fda3f14ce52bd2cfb738de23490efc;board=55 HTTP/1.1" 500 744 ";topic=23777.0;last_msg=81503" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36"
But in something called Server WWW - Error logs, I don't see anything related. Basically, it looks like:
2024-03-27 14:38:51.800230 [INFO] [1043894] [T0] [] File not found [/home/tspotter/domains/]
2024-03-27 14:38:52.280872 [INFO] [1043894] [T0] [] File not found [/home/tspotter/domains/]
2024-03-27 14:40:25.300593 [INFO] [1043894] [T0] [] Access is denied by context rewrite.
2024-03-27 14:40:43.932355 [INFO] [1043894] [T0] [] File not found [/home/tspotter/domains/]
2024-03-27 14:40:46.603232 [INFO] [1043894] [T0] [] File not found [/home/tspotter/domains/]


It would be the error log... and you should see some indication that a 500 error happened.
If you don't,  then ask your host why not

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

IIRC those two mods must be installed/uninstalled in correct order or bad things will happen.

From -

IMPORTANT NOTE FOR SMF 2.0 In order to fully support the Post and PM Inline Attachments mod you must install this mod after you install that mod!!
Also, if you subsequently need to uninstall the Post and PM Inline Attachments mod you must uninstall this mod first.

That may also apply to 2.1, you can ask in mod support topic.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters