Hi,
Sorry, I don't is this place is right for this post but wasted a lot of time to solve this problem.
I have intalled drupal on Ubuntu and calling a method...
<?php
function _send($data, $url)
{
if(!function_exists('fopen')):
exit("fopen function does not exist");
endif;
if(!ini_get('allow_url_fopen')):
exit("allow_url_fopen is not enabled in your php config file");
endif;
$handle = fopen("$url?$data", "rb");
$contents = '';
while (!feof($handle)) {
$contents .= fread($handle, 192);
}
fclose($handle);
if(trim($contents) == 0):
return true;
endif;
return false;
}
?>
When this line is executed...
$handle = fopen("$url?$data", "rb");
The page takes too much time, this line is sending request to another site.
But when I call this function on my local machine using Apache, then this operation is done in normal speed.
Is there permission problem with the server or something else...
help is required to solve this problem, thanks in advance.
CRINCH
-
It is probably having issues looking up the URL. It's probably not a permission problem. Try downloading the file at $url?$data in your browser, and see if that times out. If so, that's your problem.
-
How can I check it on the server but it is locally running fine using Apache. Please let me know that how to download using this URL.
CRINCH -
Thank a lot, I have done this using cURL. Now it is not taking much time.
CRINCH
fopen() on Ubuntu!
Discussion in 'Linux Compatibility and Software' started by crinch, Feb 4, 2008.