Bug #81307 [NEW]: session_start block echo from method POST using Fetch js

From: Date: Thu, 29 Jul 2021 13:00:55 +0000
Subject: Bug #81307 [NEW]: session_start block echo from method POST using Fetch js
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-235457@lists.php.net to get a copy of this message
From: nwnisworking at gmail dot com Operating system: Windows PHP version: Irrelevant Package: Session related Bug Type: Bug Bug description:session_start block echo from method POST using Fetch js Description: ------------ PHP version : 8.0.6 It seems that when you fetch the file using POST, if the file uses session_start, it will not render or run the .php file. The page will only load when you submit the form without using js fetch. Test script: --------------- [index.php] <script> fetch('login.php', {method : "POST", body : JSON.stringify({test : "test"})}); </script> [login.php] <?php session_start(); session_write_close(); # without this is also cause the same issue echo 'testing'; ?> Expected result: ---------------- The rendered result from fetch. Actual result: -------------- Nothing was shown from inspect_element > network. -- Edit bug report at https://bugs.php.net/bug.php?id=81307&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=81307&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=81307&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=81307&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=81307&r=needscript Try newer version: https://bugs.php.net/fix.php?id=81307&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=81307&r=support Expected behavior: https://bugs.php.net/fix.php?id=81307&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=81307&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=81307&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=81307&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=81307&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=81307&r=dst IIS Stability: https://bugs.php.net/fix.php?id=81307&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=81307&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=81307&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=81307&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=81307&r=mysqlcfg

« previous php.bugs (#235457) next »