Gossamer Forum
Home : Products : Gossamer Links : Discussions :

ConfigData.pm

Quote Reply
ConfigData.pm
Off-hand - is there any issue or reason why ConfigData.pm should get nuked during Admin Panel or setup changes?

I had just setup mod_perl and it seemed to be working. I checked Environment - ok - then I checked "Browse". Inner frame did not display anything, so I clicked over to Setup and unchecked NPH build.

At that point I lost the entire ConfigData.pm file except the copy right notice

Last edited by:

gatman: Mar 10, 2003, 9:04 AM
Quote Reply
Re: [gatman] ConfigData.pm In reply to
People have reported similar with Plugins.cfg

There may be a system-dependent issue with flat-file handling.


PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] ConfigData.pm In reply to
I just used a backup copy to replace. Seems back to normal.

I'll try and duplicate later today - see if same thing happens.
Quote Reply
Re: [gatman] ConfigData.pm In reply to
ConfigData.pm managed to delete itself on my server once, when I pressed the 'update plugins' button two times in a row. Not quite sure why it would do that though Frown Seems like an issue maybe GT should look into. Maybe create a .bak file of all the main config files, such as hooks.cfg, etc?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] ConfigData.pm In reply to
Yep - I just duplicated it.

1) set up mod_perl

httpd.conf =>
LoadModule perl_module modules/mod_perl-perl5.6.1.so
PerlRequire /usr/home/gatay/usr/local/etc/httpd/cgi-bin/startup.pl
<Location /cgi-bin/links>
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
PerlSendHeader On
</Location>

======================
/cgi-bin/startup.pl =>
#!/usr/local/bin/perl -w
use strict;
use lib '/usr/home/gatay/usr/local/etc/httpd/cgi-bin/links/admin';
require Links::mod_perl;

2) Seems to work

System Information
======================================
Perl Version: 5.006001
Links SQL Version: 2.1.2
DBI.pm Version: 1.201
Persistant Env: mod_perl (1) SpeedyCGI (0)
Mod Perl Version: 1.26
@INC =
/usr/home/gatay/usr/local/etc/httpd/cgi-bin/links/admin
../..
/usr/local/lib/perl5/5.6.1/i386-freebsd
/usr/local/lib/perl5/5.6.1
/usr/local/lib/perl5/site_perl/5.6.1/i386-freebsd
/usr/local/lib/perl5/site_perl/5.6.1
/usr/local/lib/perl5/site_perl
/usr/local/lib/perl5/5.00503/i386-freebsd
/usr/local/lib/perl5/5.00503
/usr/local/lib/site_perl
.
/usr/local/etc/httpd/
/usr/local/etc/httpd/lib/perl


3) I click Setup - Check Settings (NPH on)

4) I click Browse - no pages displayed

5) I click back to settings and try and turn off NPH

6) ConfigData.pm gets nuked below copyright


- further checked and fiound I could not execute Validate links or any other Database functions

Last edited by:

gatman: Mar 10, 2003, 10:06 AM
Quote Reply
Re: [Andy] ConfigData.pm In reply to
The problem is because, GT::Config does not use file locking at all:
Code:
open FILE, "> $filename" or return $self->error(CANT_WRITE => FATAL => $filename => "$!");
print FILE $header if $header;
The 'flock' file locking should be used once Unix is used, since the concurrent processes will manage to start writing the config file at the same time! On Windows, simulation would be possible.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...