Error: Ads not found on URL

Discussion in 'Co-op Advertising Network' started by LaCabra, Dec 10, 2004.

  1. #1
    Hi all ...
    I've been sifting throught the forums trying to solve my problem and can't seem to get things running.

    Symptoms/Problem:
    Ads not found on http://www.saylessaddlery.com/

    Account not not yet activated. | Site failed automatic validation as of 2004-12-10 (make sure URL and site type is correct - if everything is correct, make a request in the forum for assistance). Validate/Calculate Weight Now

    Here my environment:
    site name: http://www.saylessaddlery.com
    Site is static .htm/.html files
    Hosting through aplus.net running apache and php

    What I have done:
    Created ad_network.php file has been created and uploaded to website root
    Created an empty file named ad_network_ads.txt with RW (777)
    Created a file named .htaccess in the main directory with one liner in it
    Addedthe following inside my index.htm file:
    <?php
    ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    include ('ad_network.php');
    echo $ad_network[0];
    ?>

    Also tried the following:

    Created passthru.php and modified the .htaccess to reflect changes recommended. - doing so gave me an internal error.

    Can someone shed some light into this? Am I missing something? Currently I have only implemented this on my index.htm file and will be implemeting on my other .htm files once I can get this running. Any help on this would greatly be appreciated.

    Regards
    Frank
     
    LaCabra, Dec 10, 2004 IP
  2. Matts

    Matts Berserker

    Messages:
    195
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    108
    #2
    Was the one liner in the .htaccess file:
    AddType application/x-httpd-php .php .htm .html

    Make sure you have the .htm and .html there. Otherwise the php code will show in the html, and depending on where you have it, may or may not be visible. It will always be visible in the source, so when you are trying to figure this out, do a view source and look at what's there.
     
    Matts, Dec 10, 2004 IP
  3. LaCabra

    LaCabra Goats R Us

    Messages:
    1,954
    Likes Received:
    241
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi Matt,

    The .htaccess has the one liner just like you have it listed. I am getting an error when I browse the file in question (it is http://www.saylessaddlery.com/frankb.htm) in my browser. It says:

    Some files can harm your computer. If the file information below looks suspicious, or you do not fully trust the source, do not open or save this file.

    Would you like to open this file or save it on your computer?
    [open] [save] [cancel] [more info]

    I've tried following some of the info on other posts but its still a no go.

    Any ideas?
    Frank
     
    LaCabra, Dec 10, 2004 IP
  4. LaCabra

    LaCabra Goats R Us

    Messages:
    1,954
    Likes Received:
    241
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hi Matt,
    My php server configuration can be viewed at the following link (just in case this helps)
    http://pro12.abac.com/test.php
    cheers
    Frank
     
    LaCabra, Dec 10, 2004 IP
  5. Matts

    Matts Berserker

    Messages:
    195
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    108
    #5
    Those two urls are on two different domains, so are they on the same server? Put the phpinfo() command in a file named test.htm on saylessaddlery.com and see what you get.
    The frankb.htm is gone now, what was in it? You get prompted to download when IE doesn't know the mime-type, which generally happens if you have a .php extension and php isn't configed to parse the code. The addType line adds that, but what I find interesting is you're getting that on a .htm file as that is a known mime-type, and I'd expect you to get the file and actually see the php code.

    Take a look at www.php-faq.com/test.htm. That file will open fine, but if you do a view source, you'll see the php code because the server is not configed to send .htm files to php first. If you look at www.php-faq.com/test.mno, you'll get prompted to download it, because .mno isn't configed on the server as a known mime type. Both files have the exact same text in them.
     
    Matts, Dec 11, 2004 IP
  6. LaCabra

    LaCabra Goats R Us

    Messages:
    1,954
    Likes Received:
    241
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hi Matt,

    Yes the two urls are different domains. I am on a shared server and my ISP told me that I could check/test what the config of the shared server is by going to the ...

    http://pro12.abac.com/test.php

    I removed the frankb.htm file during some tests last night and tried a few other things that I read on other posts. The frankb.htm file was a copy of my index.htm. I managed to get rid of the "Some files can harm your computer." message by changing the one liner in the .htaccess file ...

    FROM:

    AddType application/x-httpd-php .php .htm .html

    TO:

    AddHandler application/x-httpd-php .htm .html

    The "Some files can harm your computer." message is now gone but I can not see any of the Ads on my index.htm or index2.htm files off my www.saylessaddlery.com domain.

    I don't know too too much about unix, so sometimes I have no idea what my changes to the .htaccess may be doing, although I get a not bad idea at times.

    Any other ideas?

    thanks in advance
    Frank
     
    LaCabra, Dec 11, 2004 IP
  7. Matts

    Matts Berserker

    Messages:
    195
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    108
    #7
    Ok, if you view source on your index2.htm page, at the bottom is:
    <?php
    ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    include ('ad_network.php');
    echo $ad_network[0];
    ?>

    So it's not being parsed by php and your .htaccess config isn't working. You have a CGI config of php, and that's not something I know about. A help desk call should fix it in 10 seconds.

    BTW: Your missing semi-colons in index2.html at the top. Looks ugly in Firefox:
    Ph: (403) 252-2335&nbsp&nbsp&nbsp&nbsp&nbspFax: (403)
     
    Matts, Dec 11, 2004 IP
  8. LaCabra

    LaCabra Goats R Us

    Messages:
    1,954
    Likes Received:
    241
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Hi Matt,

    I did some additional tests given what you said in your last post and here is what I found which is somewhat puzzling but consistent.

    First:
    I accessed www.php-faq.com/test.htm and got a blank screen on my browser (IE 6)
    I accessed www.php-faq.com/test.mno and it displayed the text contents of the file in my browser window.

    Second:
    I created www.saylessaddlery.com/test.htm and got a blank screen on my browser same as php-faq site.
    I created www.saylessaddlery.com/test.mno and got the text contents of the file in my browser window same as php-faq site.
    I created www.saylessaddlery.com/test.php and got an error "No input file specified."

    The contents of all these files is:
    <?php
    echo "Hello World\n<br />";
    ?>

    Puzzling, I am starting to wonder if it is a browser setting? Can you take a quick peek at the test files I created from your browser to see what you get? Once you have done that can you see if http://www.saylessaddlery.com/index.htm and http://www.saylessaddlery.com/index2.htm show the ads? Thanks!

    Any additional insight would greatly be appreciated. Thanks for your patience.
    Frank
     
    LaCabra, Dec 11, 2004 IP
  9. LaCabra

    LaCabra Goats R Us

    Messages:
    1,954
    Likes Received:
    241
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Ok Matt, thanks I'll see what I can do with their help desk.
    Thanks for all your help.
    Frank
     
    LaCabra, Dec 11, 2004 IP
  10. Matts

    Matts Berserker

    Messages:
    195
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    108
    #10
    php is server-side so it's not the browser.

    What you see in test.htm is correct -- it's just like your issue -- the file isn't parsed by php , and since it's inside what look like html tags to i.e. it won't display. But view source shows the code.

    I got prompted for download on the .mgo file. But there are so many bugs in IE, it could depend on the patch version.
     
    Matts, Dec 11, 2004 IP
  11. LaCabra

    LaCabra Goats R Us

    Messages:
    1,954
    Likes Received:
    241
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Does anyone know if modifying the php.ini can enable parsing of PHP for my .HTM/.HTML pages? If so can someone help me identify what needs to be changed?
    thanks
    Frank
     
    LaCabra, Dec 14, 2004 IP