Problem Running Curl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hello,

We have just ported over our site from a hosting facility and struggling to get curl working. We are using compiled Apache2, PHP php-5.3.8 with curl-7.22.0 with a 64 bit distro of Cent OS 2.6.18-238.19.1.el5.

My phpinfo says curl is installed and enabled. Note, I did not modify the php.ini as I saw references on web I didn’t need to, but I don’t see that php_curl.so is installed anywhere. I don’t know if that is an issue or not.

However, our php with curl is just hanging.

When I run a sample test script, it does run, but I get an empty file.

I have attached my configure script for php and my sample php curl test.

Does anyone know what I have done wrong or am missing?

<?php
$ch = curl_init("http://www.example.com/";);
$fp = fopen("example_homepage.txt", "w");
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
fclose($fp);
?>

../configure --prefix=/usr/local/apache/php \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-mysql=/var/lib/mysql \
--with-config-file-path=/usr/local/apache/php \
--enable-force-cgi-redirect \
--disable-cgi \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--with-gettext \
--with-gdbm     \
--with-gd    \
--with-libdir=lib64  \
--with-png-dir=/usr/lib \
--with-ttf=/usr/lib \
--with-freetype-dir=/usr \
--with-t1lib=/usr \
--with-jpeg-dir=/usr/lib \
--with-png-dir=/usr/usr \
--enable-gd-native-ttf  \
--with-curl=/usr/local


[Index of Archives]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]
  Powered by Linux