View Full Version : file_get_contents bad ad breaking site
bobafind
Aug 22nd 2004, 10:31 pm
Every once in a while an ad gets served that breaks my site layout because it causes an ugly php warning talking about file_get_contents. It only pops up rarely, but obviously if it throws the layout of the site off it's pretty big. I guess I could build in error handling, but is there any way to have ads rechecked once in a while or so, or is this something that would not be picked up in the validation?
As soon as I see the error again, I'll jot down the warning / error.
I'll keep y'all posted :)
digitalpoint
Aug 22nd 2004, 10:43 pm
Is it something that exists within the ad_network_ads.txt file?
bobafind
Aug 22nd 2004, 10:59 pm
Is it normal to have 30 or so <ad_break> tags with no ads in them at the end?
example:
<ad_break><ad_break><ad_break><ad_break><ad_break><ad_break><ad_break>
<ad_break><ad_break><ad_break><ad_break><ad_break><ad_break><ad_break>
bobafind
Aug 22nd 2004, 11:00 pm
I've also wondered why I have an empty coop ad slot now and then. This must be why. Should I clear out ad_network_ads.txt?
digitalpoint
Aug 22nd 2004, 11:06 pm
No, you shouldn't have empty ones, but you can clear the file if you want to reset it.
bobafind
Aug 22nd 2004, 11:07 pm
Warning: file_get_contents(): URL file-access is disabled in the server configuration in /home/bobafind/www/ad_network.php on line 17
Warning: file_get_contents(http://ads.digitalpoint.com/network.php?type=link): failed to open stream: no suitable wrapper could be found in /home/bobafind/www/ad_network.php on line 17
Maybe my server (virtual) disabled it after I had been in the network for a while (I had quite a few ads in the file)
digitalpoint
Aug 22nd 2004, 11:10 pm
Yeah, that looks like a server-side issue when URLs in fopen() being disabled.
bobafind
Aug 22nd 2004, 11:36 pm
My host has a fopen_url setting that is disabled by default. I enabled this and the ads started working again. What I don't understand is: if the setting was off by default, how was I able to pull down any ads in the first place?
digitalpoint
Aug 23rd 2004, 7:09 am
It was on at some point. Maybe they changed the defaults (it's on in a default install of PHP).
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.