From dirk at haun-online.de Tue Sep 1 02:34:57 2015 From: dirk at haun-online.de (Dirk Haun) Date: Tue, 1 Sep 2015 08:34:57 +0200 Subject: [geeklog-devel] No articles on geeklog.net when not logged in? In-Reply-To: <002701d0df74$54d10810$fe731830$@cogeco.net> References: <5E3F7AD6-EC8D-41D1-A0AA-8CDB8138248B@haun-online.de> <096BF359-EB96-45C0-AB81-4E6FBC0C2243@haun-online.de> <002701d0df74$54d10810$fe731830$@cogeco.net> Message-ID: <17957542-0F43-4443-8E44-815351497CDA@haun-online.de> Tom wrote: > Yes clearing the articles fixes the problem (which I just did). Not sure > why but it only seems to happen on Geeklog.net one in a blue moon (the cache > files exist but have no text). We seem to have a few more blue moons these days. I noticed the problem again a few days ago and deleted the cache and now it has happened again. Who's familiar enough with that code to add some debug statements? Dirk -- https://www.themobilepresenter.com/ From cordiste at free.fr Tue Sep 1 07:10:17 2015 From: cordiste at free.fr (cordiste) Date: Tue, 1 Sep 2015 13:10:17 +0200 Subject: [geeklog-devel] No articles on geeklog.net when not logged in? In-Reply-To: <002701d0df74$54d10810$fe731830$@cogeco.net> References: <5E3F7AD6-EC8D-41D1-A0AA-8CDB8138248B@haun-online.de> <096BF359-EB96-45C0-AB81-4E6FBC0C2243@haun-online.de> <002701d0df74$54d10810$fe731830$@cogeco.net> Message-ID: Hi all, No articles are displayed on the geeklog.net front page when I'm not logged-in :( Ben 2015-08-25 22:26 GMT+02:00 Tom : > Yes clearing the articles fixes the problem (which I just did). Not sure > why but it only seems to happen on Geeklog.net one in a blue moon (the cache > files exist but have no text). I have been getting a couple of automated > reports in the last few days of the Geeklog.net website not responding. > Maybe our server is getting overloaded by others... > > Tom > > -----Original Message----- > From: geeklog-devel [mailto:geeklog-devel-bounces at lists.geeklog.net] On > Behalf Of Dirk Haun > Sent: August-25-15 3:35 PM > To: Geeklog Development > Subject: Re: [geeklog-devel] No articles on geeklog.net when not logged in? > > Dan Stoner wrote: > >> I see articles (for example) here: >> >> https://www.geeklog.net/index.php?topic=News >> >> >> I don't see any of those on the home page. > > Exactly. The home page only shows the forum (and the About Geeklog static > page centerblock) for me. I can see the article under their respective > topics. > > Dirk > > > -- > https://www.themobilepresenter.com/ > > _______________________________________________ > geeklog-devel mailing list > geeklog-devel at lists.geeklog.net > https://pairlist8.pair.net/mailman/listinfo/geeklog-devel > > _______________________________________________ > geeklog-devel mailing list > geeklog-devel at lists.geeklog.net > https://pairlist8.pair.net/mailman/listinfo/geeklog-devel > From dirk at haun-online.de Tue Sep 1 07:56:25 2015 From: dirk at haun-online.de (Dirk Haun) Date: Tue, 1 Sep 2015 13:56:25 +0200 Subject: [geeklog-devel] No articles on geeklog.net when not logged in? In-Reply-To: References: <5E3F7AD6-EC8D-41D1-A0AA-8CDB8138248B@haun-online.de> <096BF359-EB96-45C0-AB81-4E6FBC0C2243@haun-online.de> <002701d0df74$54d10810$fe731830$@cogeco.net> Message-ID: <98795A17-6E5E-4D78-A542-DCC33956A253@haun-online.de> cordiste wrote: > No articles are displayed on the geeklog.net front page when I'm not > logged-in :( I know, it's the same for everyone. My question was: Is there any information we can derive from the current status or should I just go ahead and clear the cache again? Dirk -- https://www.themobilepresenter.com/ From websitemaster at cogeco.net Tue Sep 1 09:40:51 2015 From: websitemaster at cogeco.net (Tom) Date: Tue, 1 Sep 2015 09:40:51 -0400 Subject: [geeklog-devel] No articles on geeklog.net when not logged in? In-Reply-To: <98795A17-6E5E-4D78-A542-DCC33956A253@haun-online.de> References: <5E3F7AD6-EC8D-41D1-A0AA-8CDB8138248B@haun-online.de> <096BF359-EB96-45C0-AB81-4E6FBC0C2243@haun-online.de> <002701d0df74$54d10810$fe731830$@cogeco.net> <98795A17-6E5E-4D78-A542-DCC33956A253@haun-online.de> Message-ID: <003c01d0e4bb$d17dbc40$747934c0$@cogeco.net> Clear the Cache again. I have checked before and the cache files are there but they have no data. I am not sure what is going on especially since I can't reproduce it on my own site even in heavy traffic. I have monatastic.com checking Geeklog.net every hour for the past year or so. Once every couple of months I may get a warning that the site is down. Last week I got 13 warnings (3 on Sunday) but the site is always backup within a few minutes (I have never found it down but I have never had a chance to check the minute I got the email). The week before I got 3 warnings, and the week before that 2 warnings that Geeklog.net is down. I am assuming that the server is overloaded either by bots swarming our website or by someone else's account. I haven't had a chance to look into this yet. (Dirk if you have the time???) Maybe during maxed out server resources the cache problem happens??? It's a little weird though that it is only happening to story content on the homepage (though it is the most visiting page). It also would have to happen when the cache files are created which is set at once every 24 hours for articles. Tom -----Original Message----- From: geeklog-devel [mailto:geeklog-devel-bounces at lists.geeklog.net] On Behalf Of Dirk Haun Sent: September-01-15 7:56 AM To: Geeklog Development Subject: Re: [geeklog-devel] No articles on geeklog.net when not logged in? cordiste wrote: > No articles are displayed on the geeklog.net front page when I'm not > logged-in :( I know, it's the same for everyone. My question was: Is there any information we can derive from the current status or should I just go ahead and clear the cache again? Dirk -- https://www.themobilepresenter.com/ _______________________________________________ geeklog-devel mailing list geeklog-devel at lists.geeklog.net https://pairlist8.pair.net/mailman/listinfo/geeklog-devel From dirk at haun-online.de Tue Sep 1 10:46:27 2015 From: dirk at haun-online.de (Dirk Haun) Date: Tue, 1 Sep 2015 16:46:27 +0200 Subject: [geeklog-devel] No articles on geeklog.net when not logged in? In-Reply-To: <003c01d0e4bb$d17dbc40$747934c0$@cogeco.net> References: <5E3F7AD6-EC8D-41D1-A0AA-8CDB8138248B@haun-online.de> <096BF359-EB96-45C0-AB81-4E6FBC0C2243@haun-online.de> <002701d0df74$54d10810$fe731830$@cogeco.net> <98795A17-6E5E-4D78-A542-DCC33956A253@haun-online.de> <003c01d0e4bb$d17dbc40$747934c0$@cogeco.net> Message-ID: <41823756-EB72-4FCB-895D-6FF6DAC9225E@haun-online.de> Tom wrote: > Clear the Cache again. Done. Things should be back to normal. > I have monatastic.com checking Geeklog.net every hour for the past year or > so. Once every couple of months I may get a warning that the site is down. > Last week I got 13 warnings (3 on Sunday) but the site is always backup > within a few minutes (I have never found it down but I have never had a > chance to check the minute I got the email). The week before I got 3 > warnings, and the week before that 2 warnings that Geeklog.net is down. Probably just overloaded. I've seen this happen on occasion. > I am assuming that the server is overloaded either by bots swarming our > website or by someone else's account. I haven't had a chance to look into > this yet. (Dirk if you have the time???) The site is under almost constant attack - spam attempts, attempts to create fake accounts, more or less systematic probes for SQL injections or other know vulnerabilities. Sometimes one of those overloads the site. The sheer amount of non-hostile bots indexing the site doesn't exactly help (why does every company have to run its own web crawler these days?). Anyway, that has been the reality of the web for the last couple of years and Geeklog shouldn't just stumble over something like that so easily. We could have a race condition in the cache refresh logic, for example. Could 2 requests trigger it at the same time, overwriting each other? Or something like that? Dirk -- https://www.themobilepresenter.com/ From danstoner at gmail.com Tue Sep 1 10:53:35 2015 From: danstoner at gmail.com (Dan Stoner) Date: Tue, 1 Sep 2015 10:53:35 -0400 Subject: [geeklog-devel] No articles on geeklog.net when not logged in? In-Reply-To: <41823756-EB72-4FCB-895D-6FF6DAC9225E@haun-online.de> References: <5E3F7AD6-EC8D-41D1-A0AA-8CDB8138248B@haun-online.de> <096BF359-EB96-45C0-AB81-4E6FBC0C2243@haun-online.de> <002701d0df74$54d10810$fe731830$@cogeco.net> <98795A17-6E5E-4D78-A542-DCC33956A253@haun-online.de> <003c01d0e4bb$d17dbc40$747934c0$@cogeco.net> <41823756-EB72-4FCB-895D-6FF6DAC9225E@haun-online.de> Message-ID: >We could have a race condition in the cache refresh logic, for example. Could 2 requests trigger it at the same time, overwriting each other? Or something like that? What triggers the cache (re)generation? Also, if someone gives a pointer to which code file implements the caching mechanism (actually writes the files) I'd be curious to take a look. thanks, - Dan Stoner On Tue, Sep 1, 2015 at 10:46 AM, Dirk Haun wrote: > Tom wrote: > > > Clear the Cache again. > > Done. Things should be back to normal. > > > > I have monatastic.com checking Geeklog.net every hour for the past year > or > > so. Once every couple of months I may get a warning that the site is > down. > > Last week I got 13 warnings (3 on Sunday) but the site is always backup > > within a few minutes (I have never found it down but I have never had a > > chance to check the minute I got the email). The week before I got 3 > > warnings, and the week before that 2 warnings that Geeklog.net is down. > > Probably just overloaded. I've seen this happen on occasion. > > > > I am assuming that the server is overloaded either by bots swarming our > > website or by someone else's account. I haven't had a chance to look into > > this yet. (Dirk if you have the time???) > > The site is under almost constant attack - spam attempts, attempts to > create fake accounts, more or less systematic probes for SQL injections or > other know vulnerabilities. Sometimes one of those overloads the site. The > sheer amount of non-hostile bots indexing the site doesn't exactly help > (why does every company have to run its own web crawler these days?). > > Anyway, that has been the reality of the web for the last couple of years > and Geeklog shouldn't just stumble over something like that so easily. > > We could have a race condition in the cache refresh logic, for example. > Could 2 requests trigger it at the same time, overwriting each other? Or > something like that? > > Dirk > > > -- > https://www.themobilepresenter.com/ > > _______________________________________________ > geeklog-devel mailing list > geeklog-devel at lists.geeklog.net > https://pairlist8.pair.net/mailman/listinfo/geeklog-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From websitemaster at cogeco.net Tue Sep 1 12:31:50 2015 From: websitemaster at cogeco.net (Tom) Date: Tue, 1 Sep 2015 12:31:50 -0400 Subject: [geeklog-devel] No articles on geeklog.net when not logged in? In-Reply-To: References: <5E3F7AD6-EC8D-41D1-A0AA-8CDB8138248B@haun-online.de> <096BF359-EB96-45C0-AB81-4E6FBC0C2243@haun-online.de> <002701d0df74$54d10810$fe731830$@cogeco.net> <98795A17-6E5E-4D78-A542-DCC33956A253@haun-online.de> <003c01d0e4bb$d17dbc40$747934c0$@cogeco.net> <41823756-EB72-4FCB-895D-6FF6DAC9225E@haun-online.de> Message-ID: <006701d0e4d3$b4112800$1c337800$@cogeco.net> If that happens I would think the overwritten cache file should contain the proper text (it did create the file in the first place?). I am not too familiar with this part of the caching system though. The cache files are written by the template class found in system/classes/template.class.php Tom From: geeklog-devel [mailto:geeklog-devel-bounces at lists.geeklog.net] On Behalf Of Dan Stoner Sent: September-01-15 10:54 AM To: Geeklog Development Subject: Re: [geeklog-devel] No articles on geeklog.net when not logged in? >We could have a race condition in the cache refresh logic, for example. Could 2 requests trigger it at the same time, overwriting each other? Or something like that? What triggers the cache (re)generation? Also, if someone gives a pointer to which code file implements the caching mechanism (actually writes the files) I'd be curious to take a look. thanks, - Dan Stoner On Tue, Sep 1, 2015 at 10:46 AM, Dirk Haun wrote: Tom wrote: > Clear the Cache again. Done. Things should be back to normal. > I have monatastic.com checking Geeklog.net every hour for the past year or > so. Once every couple of months I may get a warning that the site is down. > Last week I got 13 warnings (3 on Sunday) but the site is always backup > within a few minutes (I have never found it down but I have never had a > chance to check the minute I got the email). The week before I got 3 > warnings, and the week before that 2 warnings that Geeklog.net is down. Probably just overloaded. I've seen this happen on occasion. > I am assuming that the server is overloaded either by bots swarming our > website or by someone else's account. I haven't had a chance to look into > this yet. (Dirk if you have the time???) The site is under almost constant attack - spam attempts, attempts to create fake accounts, more or less systematic probes for SQL injections or other know vulnerabilities. Sometimes one of those overloads the site. The sheer amount of non-hostile bots indexing the site doesn't exactly help (why does every company have to run its own web crawler these days?). Anyway, that has been the reality of the web for the last couple of years and Geeklog shouldn't just stumble over something like that so easily. We could have a race condition in the cache refresh logic, for example. Could 2 requests trigger it at the same time, overwriting each other? Or something like that? Dirk -- https://www.themobilepresenter.com/ _______________________________________________ geeklog-devel mailing list geeklog-devel at lists.geeklog.net https://pairlist8.pair.net/mailman/listinfo/geeklog-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From danstoner at gmail.com Tue Sep 1 20:42:49 2015 From: danstoner at gmail.com (Dan Stoner) Date: Tue, 1 Sep 2015 20:42:49 -0400 Subject: [geeklog-devel] No articles on geeklog.net when not logged in? In-Reply-To: <17957542-0F43-4443-8E44-815351497CDA@haun-online.de> References: <5E3F7AD6-EC8D-41D1-A0AA-8CDB8138248B@haun-online.de> <096BF359-EB96-45C0-AB81-4E6FBC0C2243@haun-online.de> <002701d0df74$54d10810$fe731830$@cogeco.net> <17957542-0F43-4443-8E44-815351497CDA@haun-online.de> Message-ID: Here is what I found... hope it helps someone. 1. The PHP function filemtime() returns a unix timestamp that is precise to the second. This is a rather large window of time for two requests to interact (two cache writes triggered within a second). 2. > Who's familiar enough with that code to add some debug statements? I poked at template.class.php. It already has some debug bits ready to be enabled: /** * Determines how much debugging output Template will produce. * This is a bitwise mask of available debug levels: * 0 = no debugging * 1 = debug variable assignments * 2 = debug calls to get variable * 4 = debug internals (outputs all function calls with parameters). * 8 = debug caching (incomplete) * * Note: setting $this->debug = true will enable debugging of variable * assignments only which is the same behaviour as versions up to release 7.2d. * * @var int * @access public */ var $debug = 0; The "touch" command is used to create an empty file. I suspect this is the command that is actually creating the empty file. This code is a possible area to investigate: if ($TEMPLATE_OPTIONS['cache_by_language']) { $extra_path = $_CONF['language'] . '/' . $extra_path; if (!is_dir($TEMPLATE_OPTIONS['path_cache'] . $_CONF['language'])) { @mkdir($TEMPLATE_OPTIONS['path_cache'] . $_CONF['language']); @touch($TEMPLATE_OPTIONS['path_cache'] . $_CONF['language'] . '/index.html'); } } And there are already some debug statements in there just waiting for debug to be set to level 8. if ($this->debug & 8) { printf(" Look for %s
", $filename); } The actual write of the cache file begins at Line 1685. There are no debug statements there. What does PHP do if the file write fails? I don't see any error trapping / exception handling in there. $f = @fopen($filename,'w'); if ($f !== false ) { if ($TEMPLATE_OPTIONS['incl_phpself_header']) { fwrite($f, "\n"); } fwrite($f, $tmplt); fclose($f); 3. After writing up everything above, I was thinking back to some experience with Wordpress caching in a previous life and some of the hiccups we ran into. If PHP is using one of its caching systems such as Alternative PHP Cache (APC), and depending on the server configuration (FastCGI), you can get unexpected results trying to use functions such as filemtime since one PHP process may cache the previous stat result even though another PHP process has "changed something on the filesystem". 4. A server configuration difference in either PHP process mode (modphp vs. fastcgi vs. php-fpm), PHP cache layer, etc. could explain why Tom is not able to reproduce the issue. Or, the actual traffic hitting geeklog.net is just particular or peculiar. - Dan Stoner On Tue, Sep 1, 2015 at 2:34 AM, Dirk Haun wrote: > Tom wrote: > > > Yes clearing the articles fixes the problem (which I just did). Not sure > > why but it only seems to happen on Geeklog.net one in a blue moon (the > cache > > files exist but have no text). > > We seem to have a few more blue moons these days. I noticed the problem > again a few days ago and deleted the cache and now it has happened again. > > Who's familiar enough with that code to add some debug statements? > > Dirk > > > -- > https://www.themobilepresenter.com/ > > _______________________________________________ > geeklog-devel mailing list > geeklog-devel at lists.geeklog.net > https://pairlist8.pair.net/mailman/listinfo/geeklog-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From niemans at nlbox.com Wed Sep 2 02:31:03 2015 From: niemans at nlbox.com (Wim Niemans) Date: Wed, 2 Sep 2015 08:31:03 +0200 Subject: [geeklog-devel] No articles on geeklog.net when not logged in? In-Reply-To: References: <5E3F7AD6-EC8D-41D1-A0AA-8CDB8138248B@haun-online.de> <096BF359-EB96-45C0-AB81-4E6FBC0C2243@haun-online.de> <002701d0df74$54d10810$fe731830$@cogeco.net> <17957542-0F43-4443-8E44-815351497CDA@haun-online.de> Message-ID: Also see http://project.geeklog.net/tracking/view.php?id=1750 That issue is about the "1? appearing in the content. My latest note shows that it influences also the cache when cache is on. Have not looked at the current status; just hope this helps. > > Op 2 sep. 2015, om 02:42 heeft Dan Stoner het volgende geschreven: > > Here is what I found... hope it helps someone. > > > 1. > The PHP function filemtime() returns a unix timestamp that is precise to the second. > > This is a rather large window of time for two requests to interact (two cache writes triggered within a second). > > > > 2. > > Who's familiar enough with that code to add some debug statements? > > > I poked at template.class.php. It already has some debug bits ready to be enabled: > > > > /** > * Determines how much debugging output Template will produce. > * This is a bitwise mask of available debug levels: > * 0 = no debugging > * 1 = debug variable assignments > * 2 = debug calls to get variable > * 4 = debug internals (outputs all function calls with parameters). > * 8 = debug caching (incomplete) > * > * Note: setting $this->debug = true will enable debugging of variable > * assignments only which is the same behaviour as versions up to release 7.2d. > * > * @var int > * @access public > */ > var $debug = 0; > > > > > > The "touch" command is used to create an empty file. I suspect this is the command that is actually creating the empty file. This code is a possible area to investigate: > > > > if ($TEMPLATE_OPTIONS['cache_by_language']) { > $extra_path = $_CONF['language'] . '/' . $extra_path; > if (!is_dir($TEMPLATE_OPTIONS['path_cache'] . $_CONF['language'])) { > @mkdir($TEMPLATE_OPTIONS['path_cache'] . $_CONF['language']); > @touch($TEMPLATE_OPTIONS['path_cache'] . $_CONF['language'] . '/index.html'); > } > } > > > > > And there are already some debug statements in there just waiting for debug to be set to level 8. > > if ($this->debug & 8) { > printf(" Look for %s
", $filename); > } > > > > The actual write of the cache file begins at Line 1685. There are no debug statements there. What does PHP do if the file write fails? I don't see any error trapping / exception handling in there. > > $f = @fopen($filename,'w'); > if ($f !== false ) { > if ($TEMPLATE_OPTIONS['incl_phpself_header']) { > fwrite($f, > " die ('This file can not be used on its own.'); > } ?>\n"); > } > fwrite($f, $tmplt); > fclose($f); > > > > > 3. After writing up everything above, I was thinking back to some experience with Wordpress caching in a previous life and some of the hiccups we ran into. > > If PHP is using one of its caching systems such as Alternative PHP Cache (APC), and depending on the server configuration (FastCGI), you can get unexpected results trying to use functions such as filemtime since one PHP process may cache the previous stat result even though another PHP process has "changed something on the filesystem". > > > 4. A server configuration difference in either PHP process mode (modphp vs. fastcgi vs. php-fpm), PHP cache layer, etc. could explain why Tom is not able to reproduce the issue. > > Or, the actual traffic hitting geeklog.net is just particular or peculiar. > > > > - Dan Stoner > > > > > On Tue, Sep 1, 2015 at 2:34 AM, Dirk Haun > wrote: > Tom wrote: > > > Yes clearing the articles fixes the problem (which I just did). Not sure > > why but it only seems to happen on Geeklog.net one in a blue moon (the cache > > files exist but have no text). > > We seem to have a few more blue moons these days. I noticed the problem again a few days ago and deleted the cache and now it has happened again. > > Who's familiar enough with that code to add some debug statements? > > Dirk > > > -- > https://www.themobilepresenter.com/ > > _______________________________________________ > geeklog-devel mailing list > geeklog-devel at lists.geeklog.net > https://pairlist8.pair.net/mailman/listinfo/geeklog-devel > > _______________________________________________ > geeklog-devel mailing list > geeklog-devel at lists.geeklog.net > https://pairlist8.pair.net/mailman/listinfo/geeklog-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From websitemaster at cogeco.net Wed Sep 2 09:09:45 2015 From: websitemaster at cogeco.net (Tom) Date: Wed, 2 Sep 2015 09:09:45 -0400 Subject: [geeklog-devel] No articles on geeklog.net when not logged in? In-Reply-To: References: <5E3F7AD6-EC8D-41D1-A0AA-8CDB8138248B@haun-online.de> <096BF359-EB96-45C0-AB81-4E6FBC0C2243@haun-online.de> <002701d0df74$54d10810$fe731830$@cogeco.net> <17957542-0F43-4443-8E44-815351497CDA@haun-online.de> Message-ID: <011b01d0e580$a38855a0$ea9900e0$@cogeco.net> Thanks for the input. It has been a while since I have poked around the reading/writing of the cache files. Even if 2 cache writes happen both should contain the proper contents and the write shouldn?t produce a blank file (or with a 1 in it as previously happened). If an error does happen anywhere during the process the cache file should not be created. I think this is where our main problem lies. There was a problem reading the story data from the database and then the empty cache file is created for the story. This means everyone else until that cache file expires gets to see the result of the error. If the cache file isn?t created then the next user page request should hopefully fix the missing cache page (since a missing or expired cache page is treated the same). Hopefully I will have time to look into adding a bit more error handling to try and catch this situation this month. I also want to update Geeklog.net with the latest code and upgrade the forum plugin as well. BTW I notice I had 4 more reports yesterday of Geeklog.net being down. I may install the ban plugin I have upgraded which uses the Stop Forum Spam IP list to block all IPs on the list from any access to the site.. Tom From: geeklog-devel [mailto:geeklog-devel-bounces at lists.geeklog.net] On Behalf Of Dan Stoner Sent: September-01-15 8:43 PM To: Geeklog Development Subject: Re: [geeklog-devel] No articles on geeklog.net when not logged in? Here is what I found... hope it helps someone. 1. The PHP function filemtime() returns a unix timestamp that is precise to the second. This is a rather large window of time for two requests to interact (two cache writes triggered within a second). 2. > Who's familiar enough with that code to add some debug statements? I poked at template.class.php. It already has some debug bits ready to be enabled: /** * Determines how much debugging output Template will produce. * This is a bitwise mask of available debug levels: * 0 = no debugging * 1 = debug variable assignments * 2 = debug calls to get variable * 4 = debug internals (outputs all function calls with parameters). * 8 = debug caching (incomplete) * * Note: setting $this->debug = true will enable debugging of variable * assignments only which is the same behaviour as versions up to release 7.2d. * * @var int * @access public */ var $debug = 0; The "touch" command is used to create an empty file. I suspect this is the command that is actually creating the empty file. This code is a possible area to investigate: if ($TEMPLATE_OPTIONS['cache_by_language']) { $extra_path = $_CONF['language'] . '/' . $extra_path; if (!is_dir($TEMPLATE_OPTIONS['path_cache'] . $_CONF['language'])) { @mkdir($TEMPLATE_OPTIONS['path_cache'] . $_CONF['language']); @touch($TEMPLATE_OPTIONS['path_cache'] . $_CONF['language'] . '/index.html'); } } And there are already some debug statements in there just waiting for debug to be set to level 8. if ($this->debug & 8) { printf(" Look for %s
", $filename); } The actual write of the cache file begins at Line 1685. There are no debug statements there. What does PHP do if the file write fails? I don't see any error trapping / exception handling in there. $f = @fopen($filename,'w'); if ($f !== false ) { if ($TEMPLATE_OPTIONS['incl_phpself_header']) { fwrite($f, "\n"); } fwrite($f, $tmplt); fclose($f); 3. After writing up everything above, I was thinking back to some experience with Wordpress caching in a previous life and some of the hiccups we ran into. If PHP is using one of its caching systems such as Alternative PHP Cache (APC), and depending on the server configuration (FastCGI), you can get unexpected results trying to use functions such as filemtime since one PHP process may cache the previous stat result even though another PHP process has "changed something on the filesystem". 4. A server configuration difference in either PHP process mode (modphp vs. fastcgi vs. php-fpm), PHP cache layer, etc. could explain why Tom is not able to reproduce the issue. Or, the actual traffic hitting geeklog.net is just particular or peculiar. - Dan Stoner On Tue, Sep 1, 2015 at 2:34 AM, Dirk Haun wrote: Tom wrote: > Yes clearing the articles fixes the problem (which I just did). Not sure > why but it only seems to happen on Geeklog.net one in a blue moon (the cache > files exist but have no text). We seem to have a few more blue moons these days. I noticed the problem again a few days ago and deleted the cache and now it has happened again. Who's familiar enough with that code to add some debug statements? Dirk -- https://www.themobilepresenter.com/ _______________________________________________ geeklog-devel mailing list geeklog-devel at lists.geeklog.net https://pairlist8.pair.net/mailman/listinfo/geeklog-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From websitemaster at cogeco.net Tue Sep 8 14:21:26 2015 From: websitemaster at cogeco.net (Tom) Date: Tue, 8 Sep 2015 14:21:26 -0400 Subject: [geeklog-devel] Geeklog Plugins on Github In-Reply-To: <004401d0de74$fcffa790$f6fef6b0$@cogeco.net> References: <000c01d0ddf2$2130e120$6392a360$@cogeco.net> <004401d0de74$fcffa790$f6fef6b0$@cogeco.net> Message-ID: <047201d0ea63$2cc67590$865360b0$@cogeco.net> I almost thought I had the forum imported into GitHub by using TortiseHG and the hggit extension but alas I kept getting some sort of buffer error. I have spent enough time on this so I have just committed the latest files to the Forum GitHub repository. This will have to do unless someone can figure it out! J Tom From: geeklog-devel [mailto:geeklog-devel-bounces at lists.geeklog.net] On Behalf Of Tom Sent: August-24-15 9:59 AM To: 'Geeklog Development' Subject: Re: [geeklog-devel] Geeklog Plugins on Github I forgot to add to this that if anyone can make their forum repository available online for a bit I could then import that into GitHub. I can directly add the forum files to GitHub but I then lose all the commits. I rather import if I can (which seems you can only do online from what I have read). Thanks Tom From: geeklog-devel [mailto:geeklog-devel-bounces at lists.geeklog.net] On Behalf Of Tom Sent: August-23-15 6:22 PM To: 'Geeklog Development' Subject: [geeklog-devel] Geeklog Plugins on Github Well I failed to get the organization name ?Geeklog? on Github for the plugins so I have used ?Geeklog-Plugins? instead. https://github.com/Geeklog-Plugins After a few failed attempts I was able to import over almost everything from Google Code https://code.google.com/p/geeklog/ The only plugin I have not imported is the forum plugin. The last commit is corrupted on Google Code (which I do not know how to fix) and I believe this is the reason why GitHub cannot import it. My personal forum repository is not accessible online so I cannot import it that way on GitHub. Also, I have sent out a few invitations to other Geeklog GitHub users I could find (Dengen, Mystralkk, Ivy). If you would like to be a part of this organization on GitHub please send me an email with your GitHub username and I will add you in. If anyone has a Geeklog Plugin Repository they would like to add to the Organization, you are more than welcome to as well. Still figuring things out? maybe I can import the forum using the GitHub Desktop application. I will have to give that a try next. Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: From websitemaster at cogeco.net Sat Sep 19 10:51:21 2015 From: websitemaster at cogeco.net (Tom) Date: Sat, 19 Sep 2015 10:51:21 -0400 Subject: [geeklog-devel] Geeklog Repository .hgignore Message-ID: <008a01d0f2ea$a5d20d20$f1762760$@cogeco.net> To clean up the commit file window (I am using TortoiseHG) I am going to update the .hgignore file in the Geeklog repository to include data/layout_cache data/layout_css Does it also make since to add other directories (like the ones below) which contain data that is generated by Geeklog (or it?s users during testing, etc..). I also listed a few common plugins that I tend to test and update along with Geeklog. Input would be welcome. Tom logs public_html/images/articles public_html/images/userphotos public_html/images/topics # popular plugins, if present plugins/forum public_html/forum public_html/admin/forum plugins/gus public_html/gus public_html/admin/gus plugins/ban public_html/admin/ban plugins/autotags public_html/autotags public_html/admin/autotags -------------- next part -------------- An HTML attachment was scrubbed... URL: From websitemaster at cogeco.net Sun Sep 20 11:37:38 2015 From: websitemaster at cogeco.net (Tom) Date: Sun, 20 Sep 2015 11:37:38 -0400 Subject: [geeklog-devel] [SUSPECTED SPAM] No articles on geeklog.net Fix Message-ID: <00cb01d0f3ba$482cb320$d8861960$@cogeco.net> Okay I have found an issue and I have committed a fix and also patched Geeklog.net. The issue dealt with cached articles (only) and when theme template caching was turning on. When rendering a cached article and if it was found that the cached copy has expired, the file would be deleted (as it should be). The problem was when theme template caching was turned on. After deleting the cached article instance it could not recreate a new one because it could not retrieve the cached copies of the theme's article templates. I could always recreate this issue on my site using a low article cache time (like 10 seconds). On Geeklog.net the article cache time is set to 1 day which did not always recreate the issue for some reason (as far as I could tell). Checking the article cache expiry early on and recreating the template class if a cached article file was deleted fixed the problem. Blocks and staticpage content also can be cached. No blocks are cached on Geeklog.net (as far as I know) but some staticpages are, like the "About Geeklog" page found on our homepage. The staticpages and blocks never suffered from this issue because cached articles are handled a little different. Articles contain some variables that need to be updated in the cache file, this includes things like dates (due to different user formats) and number of views. Block content when cached are cached with the block theme templates but nothing in those block theme templates needs updating. Therefore it never had this issue. Staticpages content is cached separately from the staticpage theme templates so it was protected from this issue as well. If anyone still is noticing articles missing on Geeklog.net's homepage let me know. Thanks Tom From danstoner at gmail.com Sun Sep 20 12:33:39 2015 From: danstoner at gmail.com (Dan Stoner) Date: Sun, 20 Sep 2015 12:33:39 -0400 Subject: [geeklog-devel] [SUSPECTED SPAM] No articles on geeklog.net Fix In-Reply-To: <00cb01d0f3ba$482cb320$d8861960$@cogeco.net> References: <00cb01d0f3ba$482cb320$d8861960$@cogeco.net> Message-ID: Great work Tom! - Dan Stoner On Sun, Sep 20, 2015 at 11:37 AM, Tom wrote: > Okay I have found an issue and I have committed a fix and also patched > Geeklog.net. > > The issue dealt with cached articles (only) and when theme template caching > was turning on. > > When rendering a cached article and if it was found that the cached copy > has > expired, the file would be deleted (as it should be). The problem was when > theme template caching was turned on. After deleting the cached article > instance it could not recreate a new one because it could not retrieve the > cached copies of the theme's article templates. > > I could always recreate this issue on my site using a low article cache > time > (like 10 seconds). On Geeklog.net the article cache time is set to 1 day > which did not always recreate the issue for some reason (as far as I could > tell). > > Checking the article cache expiry early on and recreating the template > class > if a cached article file was deleted fixed the problem. > > Blocks and staticpage content also can be cached. No blocks are cached on > Geeklog.net (as far as I know) but some staticpages are, like the "About > Geeklog" page found on our homepage. > > The staticpages and blocks never suffered from this issue because cached > articles are handled a little different. Articles contain some variables > that need to be updated in the cache file, this includes things like dates > (due to different user formats) and number of views. > > Block content when cached are cached with the block theme templates but > nothing in those block theme templates needs updating. Therefore it never > had this issue. > > Staticpages content is cached separately from the staticpage theme > templates > so it was protected from this issue as well. > > If anyone still is noticing articles missing on Geeklog.net's homepage let > me know. > > Thanks > > Tom > > > _______________________________________________ > geeklog-devel mailing list > geeklog-devel at lists.geeklog.net > https://pairlist8.pair.net/mailman/listinfo/geeklog-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dirk at haun-online.de Wed Sep 30 16:23:12 2015 From: dirk at haun-online.de (Dirk Haun) Date: Wed, 30 Sep 2015 22:23:12 +0200 Subject: [geeklog-devel] SLV not reporting spam Message-ID: Is anyone else getting the impression that SLV is not working as it should be? To me it looks like it's simply letting everything through. On geeklog.net, the last time it actually marked anything as spam was on October 18. I don't see a contact address on http://linksleeve.org and the person I know there seems to have moved on (not sure if my email reached him or not and whether he'd still be able to help me). Dirk -- https://www.themobilepresenter.com/