Score:0

PHP - Session Upload Progress produces 503 error

ke flag

I've just migrated from APC to using Session Upload Progress (https://www.php.net/manual/en/session.upload-progress.php).

All was going swimmingly until some forms were mysteriously throwing up Access-control errors when submitted.

After a few hours it turned out the problem occurs when you include <input type="hidden" name="FORM_UPLOAD_PROGRESS"/> (with a value) in a form, but the form doesn't have any HTML input elements of the type 'file'.

I don't know if this is an intended consequence or not, it seems like maybe not. Either way, is there any workaround to stop this happening and have the form sent as normal?

While you may not need the upload progress bar for forms without files usually this is how some of the forms were working - so as to provide some feedback for submitting forms that are processed using Javascript asynchronously.

There is nothing in php.ini I can see that might help.

The server is running Apache, php-fpm on AlmaLinux.

EDIT: logs show the following...

[Fri Jan 13 12:49:36.888492 2023] [proxy_fcgi:error] [pid 281111:tid 140530407151360] [client:57800] AH01067: Failed to read FastCGI header,
[Fri Jan 13 12:49:36.888578 2023] [proxy_fcgi:error] [pid 281111:tid 140530407151360] (104)Connection reset by peer: [client :57800] AH01075: Error dispatching request to : , 
in flag
A 50X error is the way of the webserver of saying "I have a major problem but I don't want to talk about it in public". Read the error log of your webserver. It contains a clear error message what's wrong.
Kline avatar
ke flag
I've added what appears in the logs, I can't make much from that though. There are no logs created in the php-fpm log folder or the general httpd folder just these entries in the normal virtual host log folder.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.