Error 500 when trying upload file

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

Previous topic - Next topic

IgorS

Hello.

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?

Details:
- 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.
Slava
Ukraini!
"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

IgorS

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]

Kindred

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
Слaва
Украинi

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 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.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: