Bug #81000 [NEW]: syntax error in php://input
From: ahirsch29 at gmail dot com
Operating system: Alpine Linux v3.13.5
PHP version: 8.0.3
Package: *General Issues
Bug Type: Bug
Bug description:syntax error in php://input
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 bug report at https://bugs.php.net/bug.php?id=81000&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=81000&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=81000&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=81000&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=81000&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=81000&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=81000&r=support
Expected behavior: https://bugs.php.net/fix.php?id=81000&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=81000&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=81000&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=81000&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81000&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=81000&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=81000&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=81000&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=81000&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=81000&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=81000&r=mysqlcfg
Thread (4 messages)
- ahirsch29 at gmail dot com