Loans - Loans - Loans - Cheap Flights - Bad Credit Mortgages

PDA

View Full Version : Site does not validate


WhiteGyr
Aug 13th 2004, 7:51 pm
http://web-design-is.us/ can't seem to get it started

WhiteGyr
Aug 13th 2004, 9:21 pm
I am getting the following message: Account not not yet activated. | Site failed automatic validation as of 2004-08-13 (make sure URL and site type is correct - if everything is correct, it may require manual validation)

WhiteGyr
Aug 13th 2004, 9:54 pm
I am still trying to get the "Coop Advertising Network automatic validation" routine to do it's thing. I've installed the files, set the permisson for the .txt file and set include_once ('http://web-design-is.us/ad_network.php') but the site will NOT validate or display ads -- anyone have any suggestions?

digitalpoint
Aug 13th 2004, 10:00 pm
How are you trying to run it? PHP, SSI, etc.

WhiteGyr
Aug 14th 2004, 5:45 am
The php code is in "http://www.web-design-is.us/web-design-includes/bottom.htm" I am having the same problem trying to add the site http://montanalandsale.com/ Note: when I run "http://montanalandsale.com/ad_network.php" all I get is a blank page, is that should happen?

digitalpoint
Aug 14th 2004, 8:53 am
Yes... the PHP script doesn't echo anything back, it just sets the $ad_network variable. Are you echoing that variable out somewhere in your template?

WhiteGyr
Aug 14th 2004, 8:56 am
I don't know what you mean

digitalpoint
Aug 14th 2004, 8:59 am
What's the exact PHP you have on your template file?

WhiteGyr
Aug 14th 2004, 9:02 am
<?php

$ad_file = 'ad_network_ads.txt';
for ($i = 0; $i <= 11; $i++) {
$p = substr ('../../../../../../../../../../', 0, $i * 3);
if (file_exists ($p . $ad_file)) {
$ad_file = $p . $ad_file;
break;
}
}

if (is_writable ($ad_file)) {
$ads = file_get_contents ($ad_file);
$ads = explode ('<ad_break>', $ads);

if (count ($ads) < 101 || $ads[0] + 3600 < time()) {
$ads[] = file_get_contents ('http://ads.digitalpoint.com/network.php');
$ads[0] = time();
if (count ($ads) > 101) unset ($ads[1]);
$file = fopen($ad_file, 'w');
fwrite ($file, implode ('<ad_break>', $ads));
fclose ($file);
$ad_network = end ($ads);
} else {
$ad_network = $ads[rand(1,count($ads))];
}
$ad_network .= '<!-- an-hl -->';
} else {
$ad_network = 'You must set the "ad_network_ads.txt" file to be writable.';
}
if (substr ($_SERVER['DOCUMENT_NAME'], -6) == '.shtml') {
ini_set ('zlib.output_compression', 0);
echo $ad_network;
}

?>

digitalpoint
Aug 14th 2004, 9:03 am
That should be the separate ad_network.php file... what code do you have within your normal file(s) that actually calls it though?

WhiteGyr
Aug 14th 2004, 9:06 am
<?php
ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
include_once ('http://web-design-is.us/ad_network.php');
echo $ad_network;
?>

digitalpoint
Aug 14th 2004, 9:07 am
You need to take out the domain... it should be like so:

<?php
ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
include_once ('ad_network.php');
echo $ad_network;
?>

WhiteGyr
Aug 14th 2004, 9:12 am
OK, I removed it -- but that was the it had been earlier and it did not work then either?

digitalpoint
Aug 14th 2004, 9:13 am
You getting any errors or anything? Or just no output? To debugging it by adding: echo $ad_network;
to the end of the ad_network.php file, and see if it spits anything out if you call it directly. That will at least narrow it down to the php file or the file it's being included in.

WhiteGyr
Aug 14th 2004, 9:20 am
nothing at all. I will add: echo $ad_network;

WhiteGyr
Aug 14th 2004, 9:26 am
http://www.web-design-is.us/ad_network.php still results in nothing but a blank page and http://www.web-design-is.us/ displays no ads

digitalpoint
Aug 14th 2004, 9:34 am
Okay, then the problem is in the ad_network.php file (assuming you added the echo line to it).

So let's concentrate on that... If you look at the ad_network.txt file, is it populated with any ads? Also, what version of PHP are you using?

WhiteGyr
Aug 14th 2004, 9:43 am
PHP version 4.3.8 and ad_network_ads.txt has this:

1092501400<ad_break><table width=468 height=60 bgcolor=#000000 cellpadding=1 cellspacing=0><tr><td><table bgcolor=#CCCCCC cellpadding=0 cellspacing=0 width=466 height=58><tr><td align=center valign=middle><b><a href="http://plasmatelevision.bestpricefan.com/">Plasma TV Customer Reviews</a></b><br><font size=-1>Customers Reviews and Best Prices on state-of-the-art Plasma Television and LCD TV sets</font></td></tr></table></td></tr></table><ad_break><table width=468 height=60 bgcolor=#000000 cellpadding=1 cellspacing=0><tr><td><table bgcolor=#CCCCCC cellpadding=0 cellspacing=0 width=466 height=58><tr><td align=center valign=middle><b><a href="http://www.netestate.com.au/">Australian Real Estate Listings</a></b><br><font size=-1>List your property today for free. Featuring a variety of real estate opportunities from Australia and abroad, NetEstate provides multiple listings which are ideal for realtors and private vendors.</font></td></tr></table></td></tr></table><ad_break><table width=468 height=60 bgcolor=#000000 cellpadding=1 cellspacing=0><tr><td><table bgcolor=#CCCCCC cellpadding=0 cellspacing=0 width=466 height=58><tr><td align=center valign=middle><b><a href="http://www.take-me-away.co.uk">First Class Travel</a></b><br><font size=-1>Luxury, first class or business class travel</font></td></tr></table></td></tr></table><ad_break><table width=468 height=60 bgcolor=#000000 cellpadding=1 cellspacing=0><tr><td><table bgcolor=#CCCCCC cellpadding=0 cellspacing=0 width=466 height=58><tr><td align=center valign=middle><b><a href="http://broadband.giveasyouget.net">broadband uk</a></b><br><font size=-1>GiveAsYouSurf Broadband</font></td></tr></table></td></tr></table><ad_break><a href="http://www.sendwu.com/"><img alt="westernunion" border="0" width="468" height="60" src="http://banner.westernunion.com/wucom/arc_468.gif"></A>

digitalpoint
Aug 14th 2004, 9:49 am
Okay, so it's able to get ads from the server, and it's also able to save them to the cache... strange. Any chance you want to set me up a temporary account on your server (I would just need access to that one file) so I could debug it for you?

WhiteGyr
Aug 14th 2004, 9:51 am
Great -- I'd appreciate that -- what do I do?

digitalpoint
Aug 14th 2004, 9:53 am
PM me a login/password for the server the file is on (and a path to the file if it's not in the default folder).

Also, take out the include in your template file(s) that reference it... that way your users don't see a bunch of debugging crap on your normal web pages. :)

digitalpoint
Aug 14th 2004, 10:10 am
Okay, you should be good to go. The reason the echo thing wasn't working in the ad_network.php file, is that it was within a if/then, rather than the end... no biggie though.

Anyway, the problem was that your file extensions are .htm, so your pages were spitting out the PHP include code in raw form.

What I did was add this to the end of your .htaccess file:

AddType application/x-httpd-php .htm

And all is well...

WhiteGyr
Aug 14th 2004, 10:15 am
so I need to do add "AddType application/x-httpd-php .htm" to the .htaccess of http://montanalandsale.com/ too?

digitalpoint
Aug 14th 2004, 10:18 am
If it's setup the same with .htm extensions you would.

WhiteGyr
Aug 14th 2004, 10:31 am
Thanks Shawn both sites appear to be displaying the ads now. One more question -- I expected to get some Bonus for http://www.web-design-is.us/ (it shows:0 Bonus) because I signed up http://montanalandsale.com/ using http://www.digitalpoint.com/tools/ad-network/?signup=272

What is that deal?

digitalpoint
Aug 14th 2004, 11:30 am
Ick... just found a bug. The referred by column was defined to be a tiny integer (meaning it couldn't be higher than 127). So your referral was assigned to user 127. Anyway, I fixed it and moved your referral over for you. And now going through the logs to properly move a couple others.

WhiteGyr
Aug 15th 2004, 12:57 pm
Hi Shawn

This one is displaying the banner I plan on using but it will not auto validate. Web Page Design (http://www.whitegyr.com)

Here it the .php on the site:

<?php

$ad_file = 'ad_network_ads.txt';
for ($i = 0; $i <= 11; $i++) {
$p = substr ('../../../../../../../../../../', 0, $i * 3);
if (file_exists ($p . $ad_file)) {
$ad_file = $p . $ad_file;
break;
}
}

if (is_writable ($ad_file)) {
$ads = file_get_contents ($ad_file);
$ads = explode ('<ad_break>', $ads);

if (count ($ads) < 101 || $ads[0] + 3600 < time()) {
$ads[] = file_get_contents ('http://ads.digitalpoint.com/network.php?color=EBF0F4');
$ads[0] = time();
if (count ($ads) > 101) unset ($ads[1]);
$file = fopen($ad_file, 'w');
fwrite ($file, implode ('<ad_break>', $ads));
fclose ($file);
$ad_network = end ($ads);
} else {
$ad_network = $ads[rand(1,count($ads))];
}
$ad_network .= '<!-- an-hl -->';
} else {
$ad_network = 'You must set the "ad_network_ads.txt" file to be writable.';
}
if (substr ($_SERVER['DOCUMENT_NAME'], -6) == '.shtml') {
ini_set ('zlib.output_compression', 0);
echo $ad_network;
}

?>

digitalpoint
Aug 15th 2004, 4:23 pm
I"m not seeing any ad network ads on that page/site...

WhiteGyr
Aug 15th 2004, 4:27 pm
on the bottom of the page is the banner

digitalpoint
Aug 15th 2004, 4:28 pm
That banner is not coming from the ad network... I would double check the code you have generating that ad.

WhiteGyr
Aug 15th 2004, 4:28 pm
but the site will not validate -- Account not not yet activated.

digitalpoint
Aug 15th 2004, 4:29 pm
Right, because it's not from the ad network... :)

WhiteGyr
Aug 15th 2004, 4:34 pm
sorry about that -- I see what I did now

WhiteGyr
Aug 16th 2004, 4:21 pm
Hi Shawn

Hey I switched hosts with web-design-is.us and their .htaccess file looks like:
[CODE]# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.web-design-is.us
AuthUserFile /home/webdesig/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/webdesig/public_html/_vti_pvt/service.grp[CODE]
when I add this line (AddType application/x-httpd-php .htm
) to the bottem of the code the web site will not display

What shall I do?

digitalpoint
Aug 16th 2004, 4:37 pm
My guess is that they have your site setup to not allow the AddType override. You probably will need to ask them to allow you to do it.

WhiteGyr
Aug 16th 2004, 4:50 pm
Ok -- I've already asked them why it failed.