Bug #70410 [Fbk->NoF]: Wrong value for 'upload_content_length'
| From: | php-bugs at lists dot php dot net | Date: | Sun, 24 Jul 2016 04:22:26 +0000 |
| Subject: | Bug #70410 [Fbk->NoF]: Wrong value for 'upload_content_length' | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-202554@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70410&edit=1
ID: 70410
Updated by: php-bugs@lists.php.net
Reported by: marco dot marsala at live dot it
Summary: Wrong value for 'upload_content_length'
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: HTTP related
Operating System: CentOS 6
PHP Version: 5.4.44
Assigned To: cmb
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2016-07-10 14:45:05] cmb@php.net
The documentation of CURLINFO_CONTENT_LENGTH_UPLOAD[1] notes:
| Since 7.19.4, this returns -1 if the size isn't known.
As you're using newer versions in all cases, this does not matter.
To properly diagnose the problem, we need a short but complete
example script to be able to reproduce this bug ourselves.
A proper reproducing script starts with <?php, is max. 10-20 lines
long and does not require any external resources such as
databases, etc. If the script requires a database to demonstrate
the issue, please make sure it creates all necessary tables,
stored procedures etc.
Please avoid embedding huge scripts into the report.
[1] <https://curl.haxx.se/libcurl/c/CURLINFO_CONTENT_LENGTH_UPLOAD.html>
------------------------------------------------------------------------
[2015-09-02 22:34:38] marco dot marsala at live dot it
On PHP 5.3 I have:
curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
On PHP 5.4.44 and PHP 5.5 I have newer versions of curl.
The issue seems to happen with newer versions
------------------------------------------------------------------------
[2015-09-02 15:04:04] cmb@php.net
The different behavior may be caused by different libcurl versions
(and not directly be related to PHP). Which libcurl version(s) do
you use (see e.g. PHP info)?
------------------------------------------------------------------------
[2015-09-02 13:24:26] marco dot marsala at live dot it
Description:
------------
In PHP 5.4.44 curl_getinfo($ch) for a POST request, returns an array where
'upload_content_length' is equal to the length of the post fields string.
In PHP 5.3 'upload_content_length' is float(0) but 'size_upload' assumes that
value.
Seems that the behavior of PHP 5.3 is correct and PHP 5.4 is wrong (but maybe the opposite).
This should be fixed or pointed out in the documentation as this glitch broken my script while
downgrading php.
---
From manual page: http://www.php.net/function.curl-getinfo
---
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70410&edit=1