Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

I'm loosing the file Data.pm

Quote Reply
I'm loosing the file Data.pm
Hi all

Frequently the file Data.pm located at admin/GForum/Config is overwritten loosing all the data.pm I talk with my ISP about this, and he is sure that all is ok from the server side. This is happening in any moment, and without warning. Not when i'm changing some configuration on the admin panel. Simply the file is overwritten at any situation (may be too many users over the forum?)

I wish to know if someone else have this trouble, loosing the data in the this file.

Thanx in advance Smile




http://www.webconferencia.net/
Quote Reply
Re: [webconferencia] I'm loosing the file Data.pm In reply to
Hi:

I am not having the problem... but I have an idea. CHMOD it to Read Only...
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] I'm loosing the file Data.pm In reply to
Thanx Dave !

But gforum doesn't work if the Data.pm is read only Pirate




http://www.webconferencia.net/
Quote Reply
Re: [webconferencia] I'm loosing the file Data.pm In reply to
Sorry, I did not know. LIke I said, I do not have the problem. Sorry that wouldn't work...Crazy
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [webconferencia] I'm loosing the file Data.pm In reply to
I suspect the problem is that about once / day, Gossamer Forum attempts to clear all temporary guest sessions. The problem, I suspect, is that multiple requests are hitting during the same second, so multiple gforum.cgi's attempt to do the delete, and attempt to save the config file after they've done so.

As a fix, you can try something like this:

Look in GForum.pm for a line like this:

Code:
if ($CFG->{last_guest_cleanup} + 24 * 60 * 60 < CORE::time) {

Below it, there is a comment and these lines:

Code:
$Guest->delete(GT::SQL::Condition->new(guest_last_time => '<' => (CORE::time - 60 * 60)));
$CFG->{last_guest_cleanup} = CORE::time;
$CFG->save();

Move the first of those three lines down so that the code now looks like:

Code:
$CFG->{last_guest_cleanup} = CORE::time;
$CFG->save();
$Guest->delete(GT::SQL::Condition->new(guest_last_time => '<' => (CORE::time - 60 * 60)));

Edit:

There is also a section in GForum/Authenticate.pm that could cause the same problem, though it is less likely to do so. Around line 380 is some code that looks very similar to the above, and should be changed to that this line:

GT::Session::SQL->new({ tb => $DB->table('Session') })->cleanup(60 ...

goes after the "$CFG->save()" line.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com

Last edited by:

Jagerman: Jan 10, 2003, 9:46 PM
Quote Reply
Re: [Jagerman] I'm loosing the file Data.pm In reply to
Thanx jason.

I'll see how it work now Wink




http://www.webconferencia.net/
Quote Reply
Re: [Jagerman] I'm loosing the file Data.pm In reply to
Hi Jason.

No more problems after the aplication of your fix.

Big Thanx ! Wink




http://www.webconferencia.net/