Bug #81307 [Opn->Nab]: session_start block echo from method POST using Fetch js
| From: | cmb@php.net | Date: | Thu, 29 Jul 2021 14:02:55 +0000 |
| Subject: | Bug #81307 [Opn->Nab]: session_start block echo from method POST using Fetch js | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-235458@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81307&edit=1
ID: 81307
Updated by: cmb@php.net
Reported by: nwnisworking at gmail dot com
Summary: session_start block echo from method POST using
Fetch js
-Status: Open
+Status: Not a bug
Type: Bug
Package: Session related
Operating System: Windows
PHP Version: Irrelevant
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2021-07-29 13:00:55] nwnisworking at gmail dot com
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 this bug report at https://bugs.php.net/bug.php?id=81307&edit=1