Hi, I'm using filecache and everything works fine until i did a mistake and delete my vhost.conf with some settings for my domain. After this action my file_cache won't serve any ads.
Working without caching works fine and ads will be displayed.
Does somebody knows what settings are needed in vhost.conf to get back a working file_cache ?
I think it has to be one or two settings, but i don't know which one.

Thanks in advance
simpsonetti

Comments

jeremy’s picture

Status: Active » Postponed (maintainer needs more info)

The vhost file should not affect file caching any more than it affects anything else on your website. Are you using multiple domains for your single website? Are you trying to use the ad_remote module?

Please follow the directions in documentation/DEBUG.txt and post the results here.

simpsonetti’s picture

Sorry, about the email, i don't notice that i have filled... to many things to do.

so here is the output, the domain is cloaked.

ad_dir: '/srv/www/vhosts/region-meinersen.de/httpdocs/cms/modules/ad'
debug: '2'
adcache: 'none'
nids: ''
tids: '23'
hostid: ''
url: ''
quantity: '1'
aid: '0'
ad_display: 'javascript'
Drupal bootstrap '0'.
Override cache_inc: './modules/memcache/memcache.inc'
Root drupal directory detected as '/srv/www/vhosts/xxxxxxxxxxxxx.de/httpdocs/cms'.

/srv/www/vhosts/xxxxxxxxxxxx.de/httpdocs/cms/modules/ad/serve.php: // $Id: serve.php,v 1.1.2.4 2009/01/29 06:26:02 jeremy Exp $
/srv/www/vhosts/xxxxxxxxxxxxxxxxx.de/httpdocs/cms/modules/ad/ad.module: // $Id: ad.module,v 1.2.2.29.2.96 2009/02/11 21:20:52 jeremy Exp $

No cache enabled.
Drupal bootstrap '7'.
Searching for ad from tid list: 23.
Query: "SELECT a.aid FROM {ads} a INNER JOIN {term_node} n ON a.aid = n.nid WHERE a.adstatus = 'active' AND n.tid IN(23);"
Available ads: none
Selecting 1 ad(s) from 0 total ad(s).
adserve_increment action(count) cache(none)
Drupal bootstrap '7'.
Ads displayed: 0
Invoking adserve hook 'adserve_init_text'.
Invoking adserve hook 'adserve_exit_text'.
document.write('\x3c!-- No active ads were found in the tids \'23\'. --\x3e');

There is one thing, that seems to be wrong:
there is filecache running! but the debug.php says not.

I'm using 4blocks. all are imageads.
The status of all ads are active.

and it is a singledomain, not a multisite.

You need more information ?
Simpsonetti

jeremy’s picture

You will need to get the proper ad display snippet by enabling a block and configuring the ad module correctly to use that cache method. Then, view source the page and find the correct URL (it will include something like "c=file" in the path. Fix the path per the instructions in DEBUG.txt and try again.

simpsonetti’s picture

Ah okay, now it should be right:


ad_dir: '/srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms/modules/ad'
debug: '2'
adcache: 'file'
nids: ''
tids: '461'
hostid: ''
url: ''
quantity: '1'
aid: '0'
ad_display: 'javascript'
Attempting to include cache include file '/srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms/modules/ad/cache/file/ad_cache_file.inc'.
Drupal bootstrap '0'.
Override cache_inc: './modules/memcache/memcache.inc'
Root drupal directory detected as '/srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms'.

/srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms/modules/ad/serve.php: // $Id: serve.php,v 1.1.2.4 2009/01/29 06:26:02 jeremy Exp $
/srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms/modules/ad/ad.module: // $Id: ad.module,v 1.2.2.29.2.96 2009/02/11 21:20:52 jeremy Exp $

File cache: entering.
Trying cache_file '/srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms/files/.1.ad.cache'.
Obtained lock.
File size: 4394
File cache: using hostid: 'none'.
Notice: Undefined variable: include_func_init in /srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms/modules/ad/cache/file/ad_cache_file.inc on line 81 File cache: last sync: 1241778114
File cache: current time: 1241778251
File cache: will rebuild cache now.
File cache: timestamp: 2009050812
File cache: cache_size(2)
File cache: size of $ids: 0
Selecting 1 ad(s) from 2 total ad(s).
Randomly selecting ad: 1 of 1.
Invoking adserve hook 'adserve_select' in file cache.
File cache: adserve_select: no select function defined
Default ID selection in adserve.inc.
Randomly selected ID: 196.
File cache: displaying AID: 196
Drupal bootstrap '7'.
Invoking adserve hook 'adserve_init_text' in file cache.
Function 'ad_cache_file_adserve_init_text' does not exist.
Invoking adserve hook 'adserve_exit_text' in file cache.
Function 'ad_cache_file_adserve_exit_text' does not exist.
document.write('\x3cdiv class=\"image-advertisement\" id=\"ad-196\"\x3e\x3ca href=\"http://www.xxxxxxxxxxxxxxx.de/cms/ad/redirect/196//\" title=\"Kontakt zu xxxxxxxxxxxxxxx\" onclick=\"window.open(this.href); return false;\"\x3e\x3cimg src=\"http://www.xxxxxxxxxxxxxxx.de/cms/files/werbung-120.gif\" width=\"120\" height=\"120\" alt=\"Kontakt zu xxxxxxxxxxxxxxx\" /\x3e\x3c/a\x3e\x3c/div\x3e');

This is what you need ?

Simpsonetti

jeremy’s picture

Your debug shows the ad module working and correctly serving advertisements. Are you still having trouble?

Do you have an ad blocker enabled?

simpsonetti’s picture

I'm using Firefox and Adblockplus as plugin, but for this domain it is off. But also with IE6
I still have trouble with it.
Setting is :
file_cache, 3 files to cache and 10 min of lifetime.

But there will be show nothing.

And you really mean, that the vhost.conf has nothing to do with it ?
this behavoir of the ads results in deleting the vhost.conf . (damned that i didn't make a backup of this file...)

simpsonetti’s picture

i switched the "display type" to "iframe" and get these errors: has this anything to to with my problem ?

Notice: Undefined variable: include_func_init in /srv/www/vhosts/xxxxxxxxx.de/httpdocs/cms/modules/ad/cache/file/ad_cache_file.inc on line 81 Notice: Undefined index: 463 in /srv/www/vhosts/xxxxxxxxxxx.de/httpdocs/cms/modules/ad/cache/file/ad_cache_file.inc on line 113 Notice: Undefined offset: 0 in /srv/www/vhosts/xxxxxxxxxxx.de/httpdocs/cms/modules/ad/adserve.inc on line 562 

in this case there schould be placed 3 ads. this is the content-ad-block.

Left and right is this message:


Notice: Undefined variable: include_func_init in /srv/www/vhosts/xxxxxxxxx.de/httpdocs/cms/modules/ad/cache/file/ad_cache_file.inc on line 81 

Any hint ?

simpsonetti’s picture

no more information ?

simpsonetti’s picture

Status: Postponed (maintainer needs more info) » Active
simpsonetti’s picture

once again, this time with "file_cache" . it doens'nt work too. Ads won't be displayed.


ad_dir: '/srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms/modules/ad'
debug: '2'
adcache: 'file'
nids: ''
tids: '461'
hostid: ''
url: ''
quantity: '1'
aid: '0'
ad_display: 'javascript'
Attempting to include cache include file '/srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms/modules/ad/cache/file/ad_cache_file.inc'.
Drupal bootstrap '0'.
Override cache_inc: './modules/memcache/memcache.inc'
Root drupal directory detected as '/srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms'.

/srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms/modules/ad/serve.php: // $Id: serve.php,v 1.1.2.4 2009/01/29 06:26:02 jeremy Exp $
/srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms/modules/ad/ad.module: // $Id: ad.module,v 1.2.2.29.2.96 2009/02/11 21:20:52 jeremy Exp $

File cache: entering.
Trying cache_file '/srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms/files/.1.ad.cache'.
Obtained lock.
File size: 5918
File cache: using hostid: 'none'.
Notice: Undefined variable: include_func_init in /srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms/modules/ad/cache/file/ad_cache_file.inc on line 81 File cache: last sync: 1242816900
File cache: current time: 1242816911
File cache: will rebuild cache in 49 seconds.
File cache: timestamp: 2009052012
File cache: cache_size(2)
File cache: size of $ids: 0
Selecting 1 ad(s) from 2 total ad(s).
Randomly selecting ad: 1 of 1.
Invoking adserve hook 'adserve_select' in file cache.
File cache: adserve_select: no select function defined
Default ID selection in adserve.inc.
Randomly selected ID: 196.
File cache: displaying AID: 196
Invoking adserve hook 'adserve_init_text' in file cache.
Function 'ad_cache_file_adserve_init_text' does not exist.
Invoking adserve hook 'adserve_exit_text' in file cache.
Function 'ad_cache_file_adserve_exit_text' does not exist.
document.write('\x3cdiv class=\"image-advertisement\" id=\"ad-196\"\x3e\x3ca href=\"http://www.xxxxxxxxxxxxxxx.de/cms/ad/redirect/196//\" title=\"Kontakt zu xxxxxxxxxxxxxxx\" onclick=\"window.open(this.href); return false;\"\x3e\x3cimg src=\"http://www.xxxxxxxxxxxxxxx.de/cms/files/werbung-120.gif\" width=\"120\" height=\"120\" alt=\"Kontakt zu xxxxxxxxxxxxxxx\" /\x3e\x3c/a\x3e\x3c/div\x3e');


simpsonetti’s picture

sorry for pushing again, but this is the code, that the debugmode of drupal shows:

line 80   // Allow external plug-ins to initialize these values...
line 81      if (function_exists($include_func_init)) {
line 82        $init = $include_func_init($cache, $hostid);

and this is from the debugmode as seen above:

Notice: Undefined variable: include_func_init in /srv/www/vhosts/xxxxxxxxxxx.de/httpdocs/cms/modules/ad/cache/file/ad_cache_file.inc on line 81 File cache: last sync: 1243337735

Maybe the synctime is too high. how do i sync the cache ?

simpsonetti’s picture

so now i have changed to "jquery" and put on debug=2 -> result is showing no ads

ad_dir: '/srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms/modules/ad'
debug: '2'
adcache: 'none'
nids: ''
tids: ''
hostid: ''
url: ''
quantity: '1'
aid: '0'
ad_display: 'jquery'
Drupal bootstrap '0'.
Override cache_inc: './modules/memcache/memcache.inc'
Root drupal directory detected as '/srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms'.

/srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms/modules/ad/serve.php: // $Id: serve.php,v 1.1.2.4 2009/01/29 06:26:02 jeremy Exp $
/srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms/modules/ad/ad.module: // $Id: ad.module,v 1.2.2.29.2.96 2009/02/11 21:20:52 jeremy Exp $

No cache enabled.
Drupal bootstrap '7'.
Searching for ads with no tids.
Query: "SELECT a.aid FROM {ads} a LEFT JOIN {term_node} n ON a.aid = n.nid WHERE a.adstatus = 'active' AND n.tid IS NULL;"
Available ads: none
Selecting 1 ad(s) from 1 total ad(s).
Randomly selecting ad: 1 of 1.
Invoking adserve hook 'adserve_select'.
Default ID selection in adserve.inc.
Randomly selected ID: 188.
ad:

Loading module ''.
adserve_increment action(view) cache(none)
Drupal bootstrap '7'.
Ads displayed: 1
Invoking adserve hook 'adserve_init_text'.
Invoking adserve hook 'adserve_exit_text'.

But why is there "no cache" ? i'm still using "file cache"

jeremy’s picture

You need to run cron to sync the cache.

As for your last piece of debug -- you need to carefully read DEBUG.txt that comes with the module. When debugging, you need to convert all occurrences of "&" to "&" in the URL, otherwise they are ignored (which causes things like no cache to be used).

simpsonetti’s picture

Hi Jeremy, thanks for your answer. First of all, how do i sync the cache by using cron ?
i'm running cron every 5 minutes on my server with this call "wget http:///www.xxxxx.de/cms/cron.php"
Do you mean, that i've to sync drupals-cache with ads-cache ?
i'm right ?

simpsonetti’s picture

and further:
i hope now tthat i'm doing right with my url-call: here is my output using "memcache" .
Left and rightside are working, but content-ad not. Does this have something to do with "Notice" here in debug-output ?

ad_dir: '/srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms/modules/ad'
debug: '2'
adcache: 'memcache'
nids: ''
tids: '468'
hostid: ''
url: ''
quantity: '2'
aid: '0'
ad_display: 'javascript'
Attempting to include cache include file '/srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms/modules/ad/cache/memcache/ad_cache_memcache.inc'.
Drupal bootstrap '0'.
Override cache_inc: './modules/memcache/memcache.db.inc'
Root drupal directory detected as '/srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms'.

/srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms/modules/ad/serve.php: // $Id: serve.php,v 1.1.2.4 2009/01/29 06:26:02 jeremy Exp $
/srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms/modules/ad/ad.module: // $Id: ad.module,v 1.2.2.29.2.96 2009/02/11 21:20:52 jeremy Exp $

Memcache: entering ad_cache_memcache().
Memcache: retrieving hook info from cache.
Memcache: selecting from the following ad id(s): 210, 216, 217.
Selecting 2 ad(s) from 3 total ad(s).
Randomly selecting ad: 1 of 2.
Invoking adserve hook 'adserve_select' in memcache cache.
Memcache: retrieving hook info from cache.
Memcache: adserve_select: no select function defined
Default ID selection in adserve.inc.
Randomly selected ID: 217.
Randomly selecting ad: 2 of 2.
Invoking adserve hook 'adserve_select' in memcache cache.
Memcache: retrieving hook info from cache.
Memcache: adserve_select: no select function defined
Default ID selection in adserve.inc.
Randomly selected ID: 216.
Displaying AID: 217.
Memcache: increment action(view) aid(217) group(468) hostid(none).
Memcache: incrementing ad-view-217-468-none-2009061111 (0)
Notice: Undefined variable: display_count in /srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms/modules/ad/cache/memcache/ad_cache_memcache.inc on line 75 Notice: Undefined variable: displayed_count in /srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/cms/modules/ad/cache/memcache/ad_cache_memcache.inc on line 76 Displaying AID: 216.
Memcache: increment action(view) aid(216) group(468) hostid(none).
Memcache: incrementing ad-view-216-468-none-2009061111 (0)
Invoking adserve hook 'adserve_init_text' in memcache cache.
Function 'ad_cache_memcache_adserve_init_text' does not exist.
Invoking adserve hook 'adserve_exit_text' in memcache cache.
Memcache: retrieving hook info from cache.
Memcache: adserve_exit_text: no exit_text function defined

jeremy’s picture

Status: Active » Postponed (maintainer needs more info)

Are you able to upgrade to Drupal 6? It looks like there may be a bug in the memcache module for 5.x, and I'm no longer supporting that version of the module. (I'll merge in patches, but I'm not doing any active bug fixing there myself.)

simpsonetti’s picture

Okay, i try to upgrade, but i don't know how to migrate the complete data. but nevermind, maybe there are some howto's etc.
but thanks for your answer. this was very important.

jeremy’s picture

Status: Postponed (maintainer needs more info) » Fixed

The data should be migrated automatically when you upgrade. Certainly test first on a development server to confirm though, as things can go wrong.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.