ID:               45419
 Updated by:       [EMAIL PROTECTED]
 Reported By:      circular at pctechnology dot gr
-Status:           Open
+Status:           Feedback
 Bug Type:         cURL related
 Operating System: Debian sarge
 PHP Version:      5.2.6
 New Comment:

Did you compile everything yourself? Including Apache?
This is very unlikely to be any bug, just some misconfiguration.
Try recompiling PHP without any extra stuff. Just using --with-apxs2
and --with-curl options.


Previous Comments:
------------------------------------------------------------------------

[2008-07-02 16:14:09] circular at pctechnology dot gr

Description:
------------
When the CURLOPT_RETURNTRANSFER option is set curl_exec returns the
correct output when called from the command line, but FALSE when called
through apache.

Configuration:
curl version: 7.18.2, apache 2.0.54

'./configure'  '--prefix=/usr/local' '--with-apxs2=/usr/bin/apxs2'
'--with-config-file-path=/etc/php5/apache2' '--disable-debug'
'--with-regex=php' '--disable-rpath' '--disable-static' '--with-pic'
'--with-layout=GNU' '--with-pear=/usr/share/php' '--enable-calendar'
--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg'
'--enable-bcmath' '--with-bz2' '--enable-ctype' '--with-db4'
'--with-iconv' '--enable-exif' '--enable-ftp' '--with-gettext'
'--enable-mbstring' '--with-pcre-regex=/usr/local' '--enable-shmop'
'--enable-sockets' '--enable-wddx' '--enable-xml' '--with-xmlrpc'
'--with-zlib' '--without-pgsql' '--with-kerberos=/usr'
'--with-openssl=/usr' '--enable-zip'
'--with-mime-magic=/usr/share/misc/file/magic.mime'
'--with-exec-dir=/usr/lib/php5/libexec' '--without-mm' '--with-mysql'
'--without-sybase-ct' '--with-gd=/usr/local' '--with-jpeg-dir=/usr'
'--with-png-dir=/usr' '--with-xpm-dir=/usr'
'--with-freetype-dir=/usr/local' '--enable-gd-native-ttf'
'--with-curl=/usr/local'


Reproduce code:
---------------
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://some.url";);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$converted = curl_exec($ch);
curl_close($ch);
var_dump($converted);

Expected result:
----------------
curl_exec returning the same output when the code runs either from the
console or apache.

Actual result:
--------------
the expected output when the code runs from the command line, FALSE
when run from within apache.

The error code returned is 28 (connection time-out), and curl_getinfo
returns a negative value for CURLINFO_NAMELOOKUP_TIME.

No errors are logged in apache or system logs.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45419&edit=1

Reply via email to