Welcome to WebmasterWorld Guest from 54.198.93.179

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

apache php and fopen

very slow

     
10:33 pm on Dec 3, 2006 (gmt 0)

10+ Year Member



Hi,

Wonder if anyone has had this problem, it's taken me all weekend to track this down, but finally got it to this stage:

I now have a file called a.php in my Linux server website root directory - nothing else in it but:

<?php
echo time() ;
$fp = @fopen("http://www.a-website-feed.com/feed.xml","r");
echo time() ;
?>

when I access www.mysite.com/a.php from IE - it takes about 25 seconds to complete.
On the server, when I go to the directory and run:
php a.php
it takes 2 seconds?

I guess its an apache/php problem. Has been working for ages now but suddenly causing problems.

Anyone any ideas?

Thanks

11:25 am on Dec 4, 2006 (gmt 0)

10+ Year Member



just wondering - could it be possible that using via apache there is some dns problem, but not when run interactively?
2:55 pm on Dec 4, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Good thinking, but I don't think so. There shouldn't be any difference in DNS or firewall access. I have no idea what the problem could be, though. You could change the URL to [127.0.0.1...] to eliminate network issues.
4:01 pm on Dec 4, 2006 (gmt 0)

10+ Year Member



Thanks for the idea.

The problem seems to have gone away for the time being, so I guess it must be some dns problem somewhere along the line as I have not changed anything on the machine, unless you can think of any other variable?

I will try that next time.

Thanks.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month