Bug #81000 [Opn->Dup]: syntax error in php://input

From: Date: Thu, 29 Apr 2021 08:39:43 +0000
Subject: Bug #81000 [Opn->Dup]: syntax error in php://input
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-233614@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81000&edit=1

 ID:                 81000
 Updated by:         requinix@php.net
 Reported by:        ahirsch29 at gmail dot com
 Summary:            syntax error in php://input
-Status:             Open
+Status:             Duplicate
 Type:               Bug
 Package:            FPM related
 Operating System:   Alpine Linux v3.13.5
 PHP Version:        8.0.3
 Block user comment: N
 Private report:     N

 New Comment:

Sounds like bug #80385.


Previous Comments:
------------------------------------------------------------------------
[2021-04-29 08:35:04] ahirsch29 at gmail dot com

changed Package

------------------------------------------------------------------------
[2021-04-29 08:34:06] ahirsch29 at gmail dot com

Description:
------------
FastCGI sent in stderr: "Parse error: syntax error, unexpected identifier "version"
in php://input on line 1" when sending POST with the following POST-Data:
<?xml version="1.0" encoding="UTF-8"?>
<cXML>
</cXML>

If I am sending the following data to the script:
<?php echo 3 + 3; ?>
<test>test</test>

I am getting this result:
6
<test>test</test>

Somehow the XML get's interpreted without any logic within the script that is called.

Rebooting the docker container (8.0.3-fpm-alpine3.13) will solve the problem for a while - but after
a couple hours the problem appears again.

Currently OpCache is enabled - also tryed to disable it.

Log does not show anything special:
10.240.0.100 - 29/Apr/2021:08:26:58 +0000 "POST /index.php" 200

Even if i place invalid code into the index.php:
<?php
thisShouldNotWork();

I am getting this result:
6
<test>test</test><br />
<b>Fatal error</b>:  Uncaught Error: Call to undefined function thisShouldNotWork() in
/app/source/index.php:2
Stack trace:
#0 {main}
  thrown in <b>/app/source/index.php</b> on line <b>2</b><br />

But the log shows a successful POST - even a excaption was thrown:
10.240.0.100 - 29/Apr/2021:08:29:28 +0000 "POST /index.php" 200


There might be a related bug for 7.x: https://bugs.php.net/bug.php?id=80378

Test script:
---------------
The script (index.php) contains nothing but a die();:
<?php
die();

There is no logic at all within this script so I am asuming this error somewhere else.



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=81000&edit=1


Thread (4 messages)

« previous php.bugs (#233614) next »