Doc #74580 [Opn->Fbk]: fopen() cannot handle urls longer than ~8k

From: Date: Fri, 12 May 2017 18:49:58 +0000
Subject: Doc #74580 [Opn->Fbk]: fopen() cannot handle urls longer than ~8k
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-14686@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74580&edit=1 ID: 74580 Updated by: requinix@php.net Reported by: bugs at freshsite dot de Summary: fopen() cannot handle urls longer than ~8k -Status: Open +Status: Feedback Type: Documentation Problem -Package: Documentation problem +Package: Streams related Operating System: probably all PHP Version: 5.6.30 Block user comment: N Private report: N New Comment: Thank you for this bug report. 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 and ends with ?>, 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. I'm curious to see what this 7655 URL is, and the equivalent cURL code you tried. Have you verified that the remote server was not responding with a 414? Previous Comments: ------------------------------------------------------------------------ [2017-05-12 11:53:46] bugs at freshsite dot de Description: ------------ --- From manual page: http://www.php.net/function.fopen --- If the URL, given to fopen(), is longer than 8k, it ALWAYS returns a FALSE instead of a handle. In my case (Debian 8) the URL length was "limited" by up to 7655 chars (this value may vary on systems!). When having more chars, fopen will always fail. When using cURL instead of fopen, this limit does NOT occur! Note: The URL length is a client sided value (== php sided), that means that fopen seems to have an internal ~8k buffer for the URL parameter. This buffer is NOT configurable through php.ini - but it should. However, you should mention this ~8k buffer AT LEAST in the documentation! ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74580&edit=1

« previous php.doc.bugs (#14686) next »