I've recently downloaded the cvs version of the banner module. Was able to get it working correctly from an Admin perspective and setup 2 banner locations (top of page & in box ). Banners are shown successfully (in both positions) for a couple of minutes then go away and never return.
After investigating further I notice that the cache file is empty, and stays empty. When I delete the file everything works ok - the cache file is 2K and has all 3 banners described. After 2 minutes the cache file is empty again with a size of 0K. So I delete it again, refresh a page on my site - see that the cache file is created - go to Administer -> banners -> Refresh Cache and voila the cache file is emptied to 0K and all the banners go away. It works for 2 minutes every time I delete the cache file.
Decided to forget the cache approach and user banners_db - this yields nothing - no ads are displayed.
Any ideas?
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | banner.module_2.patch | 6.26 KB | wulff |
Comments
Comment #1
jeremy commentedWhat version of Drupal are you using? What version of the banner module?
I recommend you use the cvs banner tarball with Drupal 4.6.
Comment #2
Krotty commentedI got same problem as mention above.
I use Drupal 4.6.x and CVS-version of banner module under WinXP ().
When I set "Cache handler: no cache", I got "warning: Illegal offset type in c:\program files\apache group\apache\htdocs\drupal\banner_db.php on line 19." and no ads are displayed.
When I set "Cache handler: file" and refresh cache, I see my banners.
But each time when I go to Banners Admin Page http://mysite/banners/ cache file empties, and I got message "File copy failed." on each page of site with ads block.
If I delete cache file and refresh cache - module work fine, until I visit http://mysite/banners/
Any suggestions?
Comment #3
starkfree commentedI am also having the same problem. What seems to be happening is that at some point, accessing the cache files fails, and they get emptied out. If I just refresh my page over and over again, eventually the cache files go to 0 and I can't get the ads back until I delete the cache files and let the system create new ones.
Comment #4
jeremy commentedPlease check your web server error logs when this happens. (Not the Drupal watchdog logs, but the web server error logs. For example, on apache this is the "error_log" by default...)
Comment #5
starkfree commentedHere is what my logs looked like for exactly the time it happened...
[client 127.0.0.1] PHP Warning: fread() [function.fread]: Length parameter must be greater than 0. in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\drupal\\banner_file.php on line 35, referer: http://localhost/drupal/
[client 127.0.0.1] PHP Notice: unserialize() [function.unserialize]: Argument is not a string in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\drupal\\banner_file.php on line 37, referer: http://localhost/drupal/
[client 127.0.0.1] PHP Notice: Undefined offset: 1 in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\drupal\\banner_file.php on line 51, referer: http://localhost/drupal/
[client 127.0.0.1] PHP Notice: Undefined offset: 0 in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\drupal\\banner_file.php on line 51, referer: http://localhost/drupal/
[client 127.0.0.1] PHP Notice: Undefined index: in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\drupal\\banner_file.php on line 51, referer: http://localhost/drupal/
[client 127.0.0.1] PHP Notice: Trying to get property of non-object in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\drupal\\banner_file.php on line 72, referer: http://localhost/drupal/
[client 127.0.0.1] PHP Notice: Trying to get property of non-object in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\drupal\\banner_file.php on line 78, referer: http://localhost/drupal/
[client 127.0.0.1] PHP Notice: Trying to get property of non-object in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\drupal\\banner_file.php on line 84, referer: http://localhost/drupal/
Comment #6
starkfree commentedAlso, just to add:
The server is Windows XP, Apache 2.0, and PHP 5. Drupal 4.6.x.
Comment #7
twohills commentedMe too, symptoms precisely as described. Banners disappear, cache is empty, delete cache and banners come back. Don't know what I'll do now. Spent weeks implementing Drupal, got 40 modules in so far, but if i can't make advertising revenue I may have to start again on Mambo. Sigh.
Windows XP, Drupal 4.6.5, Apache 2.0, PHP 4, MySQL5
Apache log
[Sat Mar 18 22:34:59 2006] [error] [client 127.0.0.1] PHP Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\\Apache2\\htdocs\\iocp\\banner_file.php:35) in C:\\Apache2\\htdocs\\iocp\\includes\\session.inc on line 10, referer: http://www.corepractice.org/?q=admin/banner/add
[Sat Mar 18 22:34:59 2006] [error] [client 127.0.0.1] PHP Warning: fread(): Length parameter must be greater than 0. in C:\\Apache2\\htdocs\\iocp\\banner_file.php on line 35, referer: http://www.corepractice.org/?q=admin/banner/add
[Sat Mar 18 22:34:59 2006] [error] [client 127.0.0.1] PHP Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\\Apache2\\htdocs\\iocp\\banner_file.php:35) in C:\\Apache2\\htdocs\\iocp\\includes\\session.inc on line 10, referer: http://www.corepractice.org/?q=admin/banner/add
[Sat Mar 18 22:35:32 2006] [error] [client 127.0.0.1] PHP Warning: fread(): Length parameter must be greater than 0. in C:\\Apache2\\htdocs\\iocp\\banner_file.php on line 35, referer: http://www.corepractice.org/?q=admin/banner
[Sat Mar 18 22:35:32 2006] [error] [client 127.0.0.1] PHP Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\\Apache2\\htdocs\\iocp\\banner_file.php:35) in C:\\Apache2\\htdocs\\iocp\\includes\\session.inc on line 10, referer: http://www.corepractice.org/?q=admin/banner
[Sat Mar 18 22:35:33 2006] [error] [client 127.0.0.1] PHP Warning: fread(): Length parameter must be greater than 0. in C:\\Apache2\\htdocs\\iocp\\banner_file.php on line 35, referer: http://www.corepractice.org/?q=admin/banner
[Sat Mar 18 22:35:33 2006] [error] [client 127.0.0.1] PHP Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\\Apache2\\htdocs\\iocp\\banner_file.php:35) in C:\\Apache2\\htdocs\\iocp\\includes\\session.inc on line 10, referer: http://www.corepractice.org/?q=admin/banner
Comment #8
twohills commentedP.S. using 4.6.5 download.
When I try CVS as recommended, I get Fatal error: Call to undefined function: file_directory_path() in C:\Apache2\htdocs\iocp\modules\banner\banner.module on line 62
Is that 4.7 code? (yes I did get the 4.6 CVS)
Sugestion: Is WinXP a common thread here? Does this only work on Unix?
Comment #9
twohills commentedP.P.S. If I replace the file_directory_path() with a variable_get(file_directory_path, '') to get the CVS version working, then the basic mechanism does work fine without the cache going to zero. But admin/banner gives me a white screen (no theme, no nothing) and admin/banner/settings is all screwed up with most of the screen missing ...
Comment #10
wulff commentedIn the 4.6.x version, can you try applying the attached patch? It seems to solve the problem on my setup.
Comment #11
twohills commentedSorry just saw this. Applied patch today. seems to be more stable, as in I can't break it. Will check back with you after running it a while. Thanks!!!!!!
Comment #12
wulff commentedMarking this fixed. Please reopen if further testing reveals other problems related to this issue.
Comment #13
(not verified) commented