http://www.thpsforums.com/forum/ won't validate even though ads are there and google cache shows ads as well. Can you take a look why ?
then there are no ads there. where are the ads exactly? i dont see it. except for a few links on the bottom of the page. u sure u put the codes correctly?
Those links on the bottom are ads. I chose the link only when setting this up and it worked perfect untill about 3 days ago.
Still same thing: "Ads not found on http://www.thpsforums.com/forum/" They are being shown correctly and "cache:http://www.thpsforums.com/forum/" on google shows them too with a date of Dec 26th. As far as I see everything is correct but it still won't validate
No i meant on co-op end since everything on my end is correct and ads show up correctly and google cached them too but co-op still says no ads found. As I wrote, this has been working for a while and nothing changed on my end and on Jan 5th auto-validation failed and since them I haven't been able to validate so my theory is that it would have to be a bug in validation process.
Well your ad_network.php file is outdated, so a good start would be to update that to the latest version.
Make a PHP in the same directory as your ad_network.php file with the following: <?php print_r ($_SERVER); ?> PHP: What does it output?
Here it is: Array ( [DOCUMENT_ROOT] => /home/thpsforums/public_html [HTTP_ACCEPT] => text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 [HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.7 [HTTP_ACCEPT_ENCODING] => gzip,deflate [HTTP_ACCEPT_LANGUAGE] => en-us,en;q=0.5 [HTTP_CONNECTION] => keep-alive [HTTP_COOKIE] => AWSSESSION_ID=awssession_id1105064039001r8607; AWSUSER_ID=awsuser_id1104810224931r5928; [HTTP_HOST] => www.thpsforums.com [HTTP_KEEP_ALIVE] => 300 [HTTP_USER_AGENT] => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 [PATH] => /bin:/usr/bin [REMOTE_ADDR] => 204.8.216.100 [REMOTE_PORT] => 1940 [SCRIPT_FILENAME] => /home/thpsforums/public_html/t.php [SCRIPT_URI] => http://www.thpsforums.com/t.php [SCRIPT_URL] => /t.php [SERVER_ADDR] => 204.8.216.80 [SERVER_ADMIN] => [SERVER_NAME] => www.thpsforums.com [SERVER_PORT] => 80 [SERVER_SIGNATURE] => Apache/1.3.33 Server at www.thpsforums.com Port 80 [SERVER_SOFTWARE] => Apache/1.3.33 (Unix) PHP/4.3.8 mod_perl/1.29 mod_ssl/2.8.22 OpenSSL/0.9.7a [UNIQUE_ID] => Qd3@XMwI2EIAAG0qUE8 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => GET [QUERY_STRING] => [REQUEST_URI] => /t.php [SCRIPT_NAME] => /t.php [PATH_TRANSLATED] => /home/thpsforums/public_html/t.php [PHP_SELF] => /t.php [argv] => Array ( ) [argc] => 0 )
Hmmm... looks okay there. What's the first part of your ad_network_ads.txt file (the parameters that are before the first actual ad)? Also, as a test, add this to the end of your ad_network.php file: echo '<!-- ' . $_SERVER['REMOTE_ADDR'] . ' //-->'; PHP: It seems like the remote_addr variable isn't being evaluated properly for whatever reason.
ok I found a reason now. This website is globaly load balanced. Only one web server has ad_network.php and at the bottom of the file it prints 5 ads. This is being included on both servers therefore remote_addr will always be ip address of either server and not of co-op validation server. I have corrected it by forcing to include the class= part all the time and now the site valides. Thank you for your help Shawn !!
That's really not a good solution though. If the web server is load balanced, how come it showed your IP address when you got the server variables with the script?
Because the footer on both load balanced servers simple has: include("http://<ip>/ad.php"); PHP: and the ad.php file which is on a different staging server has: echo $other_links . " | "; include("ad_network_t.php"); echo $ad_network[0] . " | " . $ad_network[1] . " | " . $ad_network[2] . " | " . $ad_network[3] . " | " . $ad_network[4]; PHP: When I placed t.php to print the array the file was propagated to both servers and it showed correct remote_addr. For now it validated when I forced it, but in the near future I'll have my webmaster modify the footer to include ad_network.php on both servers.