Welcome to WebmasterWorld Guest from 22.214.171.124 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Pubcon Platinum Sponsor 2014
apache php and fopen very slow dramstore msg:3177073 10:33 pm on Dec 3, 2006 (gmt 0) 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:
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?
dramstore msg:3177416 11:25 am on Dec 4, 2006 (gmt 0)
just wondering - could it be possible that using via apache there is some dns problem, but not when run interactively? mcavic msg:3177542 2:55 pm on Dec 4, 2006 (gmt 0)
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 [ ...] to eliminate network issues. 127.0.0.1 dramstore msg:3177619 4:01 pm on Dec 4, 2006 (gmt 0)
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.