PHP - GET variables sometimes missing on header redirect (cloudflare related?)

Multi tool use
Multi tool use
The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


PHP - GET variables sometimes missing on header redirect (cloudflare related?)



I've a strange problem with header() redirects.
There are three pages involved: upload.php (for choosing the file, POST form), doupload.php (add file to server, write to DB etc.) and target.php (doupload.php redirects to that page after sucessful upload).



My code on doupload.php at the end (the redirecting part):


$id = 5;
header("Location: https://www.mypage.com/target.php?id=".$id."&secondvar=1");
exit();



On normal circumstances it works without problems. But sometimes the connection to my webserver lacks (bad connection) and it needs 5 up to 20 seconds to complete the request.
In this case, all GET variables after 'id=5' are gone.



Example: Should be redirected to


/target.php?id=5&secondvar=1



but it's redirected to


/target.php?id=5



without the rest.
I'm using Cloudflare. Maybe there is a session problem in this cases?
I could add session_start(); to each page, but I don't think that's the problem, because on normal circumstances it works.



I'm very thankful for every help to fix that strange issue.









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

dpfNO2F Z,wZdNfTCZhUA Ty
ogh3aqh6cocg15Yn6IXfV6Qh4QJV zWVTZdbO9rvi tPnG

Popular posts from this blog

Keycloak server returning user_not_found error when user is already imported with LDAP

PHP parse/syntax errors; and how to solve them?

415 Unsupported Media Type while sending json file over REST Template