I installed drupal 5.5 and then I installed the ad module but it wont work
all modules are active and only the page "/admin/content/ad" is accessable other pages are just blank.

I tested the dev version and the stable version but the result was the same

screenshot attached

CommentFileSizeAuthor
#23 kas.jpg64.24 KBismaiel
#23 kas2.jpg24.61 KBismaiel
blank.jpg79.88 KBholydrupal
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Nels’s picture

I'm having a similar problem with the current stable release of of Ad.

Unlike holydrupal, I see a list of ads I created, and the ads display fine when I'm logged in as superuser, but not when not logged in or logged in as a "regular" user.

I ran debug with http://www.nashvillecityblogs.com/drupal/modules/conrib/ad/adserve.php?q=1&t=2&debug=2

and here's the result:

ad_dir: '/home/nashblog/public_html/drupal/modules/conrib/ad'
/ndebug: '2'
/ncache: 'none'
/nnids: ''
/ntids: '2'
/nhostid: ''
/nquantity: '1'
/naid: '0'
/nRoot drupal directory detected as '/home/nashblog/public_html/drupal'.

/home/nashblog/public_html/drupal/modules/conrib/ad/adserve.php: // $Id: adserve.php,v 1.2.2.15.2.22 2007/07/25 04:42:02 jeremy Exp $ 
/home/nashblog/public_html/drupal/modules/conrib/ad/ad.module: // $Id: ad.module,v 1.2.2.29.2.43 2007/08/03 14:06:15 jeremy Exp $ 

No cache enabled.
Drupal bootstrap '7'.

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/nashblog/public_html/drupal/modules/conrib/ad/adserve.inc:232) in /home/nashblog/public_html/drupal/includes/bootstrap.inc on line 860

Warning: Cannot modify header information - headers already sent by (output started at /home/nashblog/public_html/drupal/modules/conrib/ad/adserve.inc:232) in /home/nashblog/public_html/drupal/includes/bootstrap.inc on line 531

Warning: Cannot modify header information - headers already sent by (output started at /home/nashblog/public_html/drupal/modules/conrib/ad/adserve.inc:232) in /home/nashblog/public_html/drupal/includes/bootstrap.inc on line 532

Warning: Cannot modify header information - headers already sent by (output started at /home/nashblog/public_html/drupal/modules/conrib/ad/adserve.inc:232) in /home/nashblog/public_html/drupal/includes/bootstrap.inc on line 533

Warning: Cannot modify header information - headers already sent by (output started at /home/nashblog/public_html/drupal/modules/conrib/ad/adserve.inc:232) in /home/nashblog/public_html/drupal/includes/bootstrap.inc on line 534
Ads previously served: 0
Searching for ad from tid list: 2.
Query: "SELECT a.aid, a.adtype, a.redirect, a.activated, a.maxviews, a.maxclicks FROM {ads} a INNER JOIN {term_node} n ON a.aid = n.nid WHERE a.adstatus = 'active' AND (n.tid = 2) ORDER BY RAND() LIMIT 1;"
ad: 
stdClass Object
(
    [aid] => 8
    [adtype] => image
    [redirect] => http://www.nashvillecityblogs.com/drupal/ad/redirect/8
    [activated] => 1197949348
    [maxviews] => 0
    [maxclicks] => 0
)

Loading module 'modules/conrib/ad/image/ad_image.module'.
Ads displayed: 1
document.write('

');
Nels’s picture

It looks like it's trying to pull the ad image files from the mythical //[drupalroot]/system/files/File.gif when the file actually exists at //[drupalroot]/files/File.gif

holydrupal’s picture

so whats the solution :(
For weeks I am waiting for an answer!

any idea how we could fix this problem ?

Nels’s picture

I was able to get ads to show to the anonymous users by adding the permission "View Uploaded Files".

This doesn't address the blank page issue.
@holydrupal: Have you looked at the Troubleshooting FAQ - Blank Page - White Screen of Death here: http://drupal.org/node/158043 ?

holydrupal’s picture

I assume the issue is within the ad module not the drupal as far as my whole modules works fine except the ad module.

when I click one of the tabs of the ad page such as groups, it just show me a blank screen:

<body>

<img src="http://****.com/persian/admin/content/ad/groups" alt="http://****.com/persian/admin/content/ad/groups"/>

</body>

I don't know what this img have to do with ad module?!!!!
I am really exhausted :(

Please someone help me.

Jeremy’s picture

For a blank page, review the Apache log. There's no reason Drupal 5.5 should be an issue. Are you using symbolic links? If so, that's most likely your problem. With the development snapshot version, there's a DRUPAL_ROOT configuration option at the top of adserve.inc allowing you to support installations using symbolic links.

holydrupal’s picture

Thanks for your reply.
unfortunately I am using a shared hosting account and I couldn't access to my apache logs.

I installed drupal on a folder called "Persian" and the ad module is in "sites/all/modules" folder. I don't build any other website other than "Persian". I tried to change the drupal_root before but it doesn't worked.
There is no error in drupal's logs.

I hope we could solve the problem.

Please let me know if you need any further information.
regards,

Jeremy’s picture

I have confirmed that the ad module works fine with Drupal 5.5. If you are getting a blank white screen, you will need to speak with your web host to get access to your apache error logs to determine what the error is.

holydrupal’s picture

Category: support » bug
Priority: Normal » Critical
Status: Postponed (maintainer needs more info) » Active

here is my apache logs:

hope some one could help me.

Jeremy’s picture

That is your access_log. You need to review your error_log during the time that you saw the blank white pages.

holydrupal’s picture

I found the problem which is so unusual!!!

I always connect to internet without proxy but today while I was surfing the site with a proxy software, The ad module and all the settings are working!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I don't have any idea!
please if anyone could guess the target of this problem let me know?

so unusual issue which caused big latency in my project.

Jeremy’s picture

Category: bug » support
Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

You say it works with a proxy, or without? What are you trying to debug, the times it doesn't work, or the latency issues? More detail about what is going on is required in order to try and help you.

Again, if you're getting blank white pages, that will usually show up in the Apache error_log. Or, if there's a proxy in between you and the website, then refer to the proxy logs.

holydrupal’s picture

the module works fine when I'm using a proxy so most probably there is something with my ISP. I must check other ISPs to see if they are the same or not.

holydrupal’s picture

Status: Postponed (maintainer needs more info) » Active

I installed Firebug for investing about this issue.

<body><img src="http://anjomansang.com/persian/admin/content/ad/configure" alt="The image “http://anjomansang.com/persian/admin/content/ad/configure” cannot be displayed, because it contains errors."/></body>

does the above code will help u?

In the Tab "Net" in firebug it shows:

Response Headers
Cache-Control	max-age=1000
Content-Language	en
Content-Length	43
Content-Type	image/gif
Server	kav/7.0
Request Headers
Host	xx.com
User-Agent	Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Accept	text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language	en-us,en;q=0.5
Accept-Encoding	gzip,deflate
Accept-Charset	ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive	300
Connection	keep-alive
Cookie	has_js=1; has_js=1; has_js=1; has_js=1; has_js=1; __utmz=97195471.1199565335.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); SESS345245904ee99ad13cbe20b0be65c9fb=ae5a533ef662e83da0006c5e8726278b; SESS96a9e0ba916c7dcf34feb8f46c3f87f6=3772dadfaabd1cca117f205653d5a3c5; SESSb120e433ca447cd8f350eb4565728d81=a22189baa0487f9fbf35519c56979808; __utma=97195471.749598458.1199565335.1199730391.1199742476.4; __utmc=97195471.1; dhtml_menu=sub9,sub91,sub5,sub8,sub11,sub10,sub13; __utmb=97195471.1; SESS9be0f659f3ed2ef26135a4028e8698ed=49bf04230c99201adae906b365b06143

but there is no information in Tab "response" which I think it means a white page.(no info=white page)

the white page appear very quickly when I'm clicking on the ad module Tabs.

Jeremy’s picture

Status: Active » Postponed (maintainer needs more info)

When you get this white page, do any logs get added to the apache access_log or the apache error_log? If no, then your request isn't even getting to your web server. If yes, then there _must_ be an entry in the error_log, and this will explicitly tell you why Apache is failing to serve that specific PHP page.

holydrupal’s picture

Category: bug » support
Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

No, I couldn't find any error log both in Cpanel and also in drupal watchdog, But I couldn't understand why this happen?
why only ad module tab wont work in website. I have installed many modules yet but yet none of them had the issue like this one?!

Couldn't understand what causing this problem !:

Jeremy’s picture

Okay, now I know what your problem is.

You are on Windows, and you're running some firewall/ad blocker software that's filtering out any URL that has /ad/ in the URL. You need to either disable this software, or whitelist your website, or otherwise configure it to allow you to navigate your own website.

It's worth upgrading to the recently released 5.x-1.4 as well, as I added quite a few new sanity checks.

Jeremy’s picture

This could also be caused by AdBlocker on FireFox.

holydrupal’s picture

WOOOOO!
yes, you were right!
the ad module is working with IE!!!
I definitively will upgrade to 1.4.

the module just wont in FF. how could I fix this issue in FF?

Jeremy’s picture

If it's only affecting FireFox, then it's most likely your usage of the AdBlock add-on. Try simply disabling it and see if the problem goes away. If so, then you'll probably want to whitelist your own website.

holydrupal’s picture

It just affect Firefox but I don't use AdBlock add-on. does it installed by default?

Jeremy’s picture

The problem is obviously outside of the ad module, I'm not sure how much more help I can be to you. All I can recommend is that you go through your firefox configuration until you figure out what is causing these pages to not display. I would start in Tools -> Add Ons, but review your entire installation if you don't find anything there.

ismaiel’s picture

Component: ad.module » ad module
FileSize
24.61 KB
64.24 KB

the Problem is
the Kaspersky Internet Security
to Solve the Problem you have to Disable the Anti-Banner from
go to
Protection --- Firewall -- Uncheck Enable Anti-Banner

but this will not solve the problem for all visitors
Its seems that the main problem from the name of the module (ads)

Jeremy’s picture

Ad blockers are designed to block advertisements, pure and simple. The name of the ad module could be changed, as could the path that advertisements are served from, but ad blockers then simply need to update their list of blocked paths.

If people choose to enable ad blockers, I personally respect their decision to not view ads and do not make any attempt to work around this.

Jeremy’s picture

Title: advertisment wont work with drupal 5.5 » ad module blocked by ad blockers
Status: Postponed (maintainer needs more info) » Closed (works as designed)

Updating the title of this issue, and marking as by design. The ad module is designed to serve ads, while ad blockers are designed to block ads.

silvanov’s picture

I'm looking at installing this module, and wondering if this issue was with a default firefox install, or with the mentioned Kaspersky Internet Security program. I'd hate to get my ads all set up and all firefox users not be able to see them.

Jeremy’s picture

Default firefox does not block ads, only if you install something like Adblock Plus along with an aggressive filter subscription.

iamnoskcaj’s picture

This is a bummer, because my "ads" are actually INTERNAL "ads" that link to our own INTERNAL CONTENT.

Essentially I wanted to spotlight sections of the site -- so I thought of the graphics that I created as "ads" -- but if simple adblockers are going to filter this, then my frontpage will be pretty bare.

Off to find a different system... unless someone has a suggestion?

Jeremy’s picture

I'd start by renaming the "ad" directory to something else. "ad/serve.php" is easy to match on. "foo/serve.php" much less so. (If you rename your ad directory, you may have to re-enable the module as the path will change. Nothing will be lost though, otherwise.)

ratinakage’s picture

Hi,

I am also very interested in the best way to solve this problem. My entire front page is going to be an image that will change randomly and lead you to various featured products on the site. It seems stupid that this would be blocked by Firefox AdBlock since I am using this module to show products on a shopping site. Anyone on this site is there to see products obviously.

AdBlock hides this image leaving my front page basically a black empty screen with a menu at the top and columns on the side.

Can you elaborate on instructions that might make AdBlock stop blocking my image. Here's the rendered HTML code in a browser without AdBlock.

<div class="advertisement group-tids-3" id="group-id-tids-3"><script type='text/javascript' src='http://localhost/mydrupalsite/sites/all/modules/ad/serve.php?q=1&amp;t=3&amp;u=node%2F1&amp;l=home'></script></div> 

Its a shame but if I can't solve this issue then I can't use this module.

Michael_Lessard_micles.biz’s picture

See also the Ad module discussion here [ https://drupal.org/node/663742 ] which proposes various solutions and helpful methods, including a simple script asking the viewer to whitelist your site (i.e. I use Ad module to show not-for-profit banners and images).