ID: 45540
Updated by: [EMAIL PROTECTED]
Reported By: jdespatis at yahoo dot fr
-Status: Open
+Status: Feedback
Bug Type: Streams related
Operating System: Linux Kubuntu
PHP Version: 5.2.6
New Comment:
Ok. Now can you provide a proper self-contained reproducing script. One
that starts with <?php, ends with ?> and can be run on the command line.
ie. no POST required..
Previous Comments:
------------------------------------------------------------------------
[2008-07-18 16:45:03] jdespatis at yahoo dot fr
[EMAIL PROTECTED]:~$ cat php-5.2.6/config.nice
#! /bin/sh
#
# Created by configure
'./configure' \
'--enable-sockets' \
'--enable-soap' \
'--with-mysql' \
'--enable-mbstring' \
'--enable-ftp' \
'--with-zlib' \
'--with-openssl' \
'--prefix=/home/enzo/divers/php_compil/' \
'--exec-prefix=/home/enzo/divers/php_compil/' \
'--disable-short-tags' \
"$@"
------------------------------------------------------------------------
[2008-07-18 16:05:44] [EMAIL PROTECTED]
For the second time: What was the configure line you used to build PHP?
------------------------------------------------------------------------
[2008-07-18 12:23:17] jdespatis at yahoo dot fr
And to help to diagnose the problem
i can perfectly make this script work if I code the stream by my own
for example, I replace stream_context_create by some code using
fsockopen, all works perfectly ... (i really think stream_context_create
leaves some \r \n in some special case ...)
$context = stream_context_create($opts);
$buff =
@file_get_contents("http://uploads.gdata.youtube.com/feeds/api/users/$username/uploads",
false, $context);
by
$fp = fsockopen("uploads.gdata.youtube.com", 80, $errno, $errstr, 30);
if (!$fp) {
return "Youtube unreachable $errstr ($errno)";
}
$out = "POST /feeds/api/users/$username/uploads HTTP/1.0\r\n";
$out .= "Host: uploads.gdata.youtube.com\r\n";
$out .= "Content-Length: " . strlen($opts["http"]["content"] ."\r\n";
$out .= "Connection: Close\r\n";
$out .= $opts["http"]["header"];
$out .= "\r\n";
$out .= $opts["http"]["content"];
fwrite($fp, $out);
$buff = "";
while (!feof($fp)) {
$buff .= fgets($fp, 4096);
}
fclose($fp);
------------------------------------------------------------------------
[2008-07-18 08:44:26] jdespatis at yahoo dot fr
No this bug is different than bug 43222.
In the latter the post content seems to be good except a CRLF more
which is not dramatic
In my case, the post content and header are completely broken...
I've modified my configuration to forbid short open tag
(i check with echo ini_get("short_open_tag") which returns nothing
meaning false)
and i get the same bug.
But as I said, one could thing the bug comes from here (i've thought
also), but not at all, the bug disappear if i let the short tag <? but
change something else
Php behavior is really weird...
------------------------------------------------------------------------
[2008-07-17 22:46:57] [EMAIL PROTECTED]
Are you sure this isn't same issue as reported in bug #43222 ?
What was the configure line you used to configure PHP?
Is short_open_tag enabled? Check from phpinfo()!
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/45540
--
Edit this bug report at http://bugs.php.net/?id=45540&edit=1