ID: 23539
Comment by: daniel at haxx dot se
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:
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)
Previous Comments:
------------------------------------------------------------------------
[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