ID: 23539
Updated by: iliaa@php.net
Reported By: ramato at squiz dot net
Status: Verified
Bug Type: cURL related
Operating System: Redhat Linux 7.3
PHP Version: 4.3.2RC2
New Comment:
Daniel,
I do not believe it is curl_easy_perform(), who is at fault here, but
the strange text that I can see occurs every single time and definately
is not printed by anything inside PHP. Unfortunately I am not fluent in
libcurl source to give you much more information then that. I did
however write a small scirpt that is the equivalent of the above code
in C (well, it does the same thing) and did not get any strange text.
Previous Comments:
------------------------------------------------------------------------
[2003-05-14 05:12:42] drhelper at mail dot ru
Snapshot php4-STABLE-200305140730 this bug
exist up to the point.
Any curl_exec() produces random text output.
------------------------------------------------------------------------
[2003-05-12 06:39:17] daniel at haxx dot se
Are you saying that curl_easy_perform() behaves wrongly or that you use
the output from it badly in the PHP/CURL glue code?
If it is the first, can you provide a small test code that shows the
problem?
(libcurl maintainer)
------------------------------------------------------------------------
[2003-05-08 20:12:39] iliaa@php.net
The output (garbage) actually does not come from PHP but rather from
curl_easy_perform(). I am guessing it is a result of some value not
being initialized and random data is being treated as a 'real' value.
------------------------------------------------------------------------
[2003-05-08 03:29:27] edink@php.net
I can reproduce the problem.
------------------------------------------------------------------------
[2003-05-08 01:21:57] ramato at squiz dot net
<?php
$url = 'http://www.php.net';
$ch = curl_init($url);
echo curl_error($ch);
curl_exec ($ch);
curl_close ($ch);
?>
Produces random text output for the script.
The configure command was
'./configure' '--with-apxs=/usr/local/apache/bin/apxs'
'--with-config-file-path=/etc' '--enable-versioning'
'--enable-inline-optimization' '--enable-memory-limit' '--with-xml'
'--with-gd' '--with-jpeg-dir=/usr' '--enable-exif'
'--with-bz2=/usr'
'--enable-bcmath' '--with-openssl' '--with-zlib=/usr'
'--enable-wddx'
'--enable-ftp' '--with-curl=/usr' '--with-gettext'
'--with-pspell=shared,/usr' '--with-mysql=shared,/usr'
'--enable-gd-native-ttf' '--with-freetype-dir=/usr'
'--with-ldap=shared' '--with-pgsql=shared' '--enable-mbstring'
'--with-pear'
The strange thing is apache doesn't appear to segfault and nothing is
logged to the php_error log file. Adjusting the error reporting to
E_ALL doesn't change this.
phpinfo reports that curl is enabled and the curl information line in
phpinfo has libcurl/7.10.4 OpenSSL/0.9.6b zlib/1.1.3
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23539&edit=1