Hello.
I am facing the same problem now.
Zrzut ekranu 2024-03-27 133639.png
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?
Details:
- Default theme
- PHP 8.1
- SMF 2.1.4
- Some mods installed, like mentioned below:
Zrzut ekranu 2024-03-27 133752.png
Topic split from Error 500 when trying upload file (https://www.simplemachines.org/community/index.php?topic=582119.0)
Have you checked to see what is logged in your server's error log when this happens? Every HTTP 500 should get logged.
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 "http://www.truck-spotters.eu/index.php?action=post;topic=23777.0;last_msg=81503" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 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] [66.249.81.9:53200#APVH_www.truck-spotters.eu] File not found [/home/tspotter/domains/truck-spotters.eu/public_html/attachments/59925_523a658ac12696e0e77e149f27ab51e5462a6cc4]
2024-03-27 14:38:52.280872 [INFO] [1043894] [T0] [66.249.81.9:53200-1#APVH_www.truck-spotters.eu] File not found [/home/tspotter/domains/truck-spotters.eu/public_html/attachments/7510_1680b1c018467e6acaebf54ee131e64f1a117d4f]
2024-03-27 14:40:25.300593 [INFO] [1043894] [T0] [17.241.219.153:44478#APVH_www.truck-spotters.eu] Access is denied by context rewrite.
2024-03-27 14:40:43.932355 [INFO] [1043894] [T0] [66.249.81.2:46325#APVH_www.truck-spotters.eu] File not found [/home/tspotter/domains/truck-spotters.eu/public_html/attachments/89455_7529b9f971c6a9746d32d0c8686c8122239cbb50]
2024-03-27 14:40:46.603232 [INFO] [1043894] [T0] [66.249.64.41:41787-1#APVH_www.truck-spotters.eu] File not found [/home/tspotter/domains/truck-spotters.eu/public_html/attachments/79044_a26064a46ac3a696091d735100070c705e3415a2]
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
IIRC those two mods must be installed/uninstalled in correct order or bad things will happen.
From https://custom.simplemachines.org/index.php?mod=4087 -
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.