The latest ad network update causes the following error to appear every now and then: Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/.sites/33/site5/web/includes/db_mysql.php on line 158 (that's not a path on my server... so it's coming from the network...) And an ad that says: ad_network.php file needs updating appears even though I JUST updated... should I purge the txt file?
This happend to me last week. Open the ad_network_ads.txt file, search for that string and delete the ad. It will take it out of rotation. -jay
lol. Well, there is a reason it is in there. Going in to your ads file and deleting it is not the solution. I won't hold being a Seminole fan against you
I guess in Shawns absence just report if it comes back after you delete it. If it comes back then it was meant to be there. If not, its just left over from pre update.
No, like a hurricane on crack. I took a couple of benadryl this morning as my allergies are going nuts today....I just re-read this thread, and I swear it said something else. I think I need a nap.
My guess is it was left in there for awhile since the old ad_network.php file wasn't expiring old ads. Let me know if it appears with the new code after you have flushed the ad_network_ads.txt file.
err... there seems to be a problem look at the text ads http://www.timber-top.com/ and http://70.85.48.68/~timberto/ at first I had just one banner plus text saying it needs to be upgraded on each site intermittently and now I have 5 banners on two sites all the time The 70 has its txt flushed and the other not The reason for the two sites is the server is in the process of moving
Search your servers for ad_network.php files. Your server is mostly up to date (70.85.48.68 seems to be updated), but it's requesting banner ads (not sure if that's what you want or not). Another machine (66.195.127.141) is still requesting old data for that site.
Ahhhh....I just went and grabbed the ad_network.php from the master file didn't think that it might be on default as banner.....oops I only use text ads and have all the sites to do so at least it was early in the piece - in the meantime the ISP shifts from Florida to Texas .... really helpful today of all days as legal stuff is flying around and emails suddenly become intermittent. I'll try and be more observant next time Thanks Shawn
Hi! My ISP don't permit using file_get_contents function (they say: security reasons) They recommend to use curl instead of. In "old version" I made some modifications to use curl to open file. Everything worked fine. Now I did the same (changed file_get_contents function to curl funtion) but I have problem - ad_network_ads.txt is written only one time (one ad link is written to this file). I have 5 the same ads on my site in result! Here is what I changed: original (line 3 to 10): if (!function_exists('file_get_contents')) { function file_get_contents($url) { $handle = fopen($url, 'r'); $string = fread($handle, 4096000); fclose($handle); return $string; } } PHP: changed to: if (!function_exists('url_fopen')) { function url_fopen ($url) { $user_agent = "Mozilla/8.0 (Windows 2008 SP32 + 3patch)"; $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_USERAGENT, $user_agent); curl_setopt ($ch, CURLOPT_COOKIEJAR, "cookie.txt"); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt ($ch, CURLOPT_TIMEOUT, 120); $string = curl_exec ($ch); curl_close($ch); return $string; } } PHP: original (line 32): $ads = file_get_contents ($ad_file); PHP: changed to: $ads = url_fopen ($ad_file); PHP: original (line 37): $new_ad = file_get_contents ('http://ads.digitalpoint.com/network.php?b=' . $_SERVER['SERVER_NAME']); PHP: changed to: $new_ad = url_fopen ('http://ads.digitalpoint.com/network.php?b=' . $_SERVER['SERVER_NAME']); PHP: What is wrong?
Update: the original issues that this thread was about... seem to be fixed. Just had to give the txt file a little cleaning.