|
Posted by BinnyVA on 11/06/06 16:36
Thanks for the help.
> - Are you sure you're using the same instance of PHP? (CLI vs Apache
module)
Yes - I did not compile php myself - I just used what came with the
OS(FC5).
> - Is cURL statically compiled into PHP or a loadable module?
I think it is statically compiled - as I said, it came with the OS.
Anyway
the 'Configure Command'(in php_info) had this '--with-curl' - that
means it is
statically compiled, right?
> - Do you have error_reporting set to the maximum and display_errors
> turned on to see any errors?
No.
> - You could do some more error checking of the return values, and
look at
> curl_error()
Made some changes to the code...
header("content-type:text/plain");
error_reporting(E_ALL);
$ch = curl_init("http://localhost/");
curl_setopt($ch, CURLOPT_URL, "http://localhost/data.txt");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);thing.
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_NOBODY, false);
$response = curl_exec($ch);
if(is_int($response)) {
die(curl_error($ch));
}
print "'$response'\n";
print_r(curl_getinfo($ch));
curl_close($ch);
----------------
Now the response is this...
''
Array
(
[url] => http://localhost/data.txt
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0
[namelookup_time] => 0.000296
[connect_time] => 0
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => 0
[upload_content_length] => 0
[starttransfer_time] => 0
[redirect_time] => 0
)
--------------
> Could be some sort of environment issue, but not much information
> to go on so could be something else.
What information do you need?
--
Binny V A
http://binnyva.blogspot.com/
Navigation:
[Reply to this message]
|