Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

recompile gforum

Quote Reply
recompile gforum
yes ive changed all the paths but i'm still getting the same error. i think because gforum is running the compiled perl files with the old paths.

any idea how i get that sum b1tch to recompile?

thanks
Quote Reply
Re: [meat bone] recompile gforum In reply to
Hi,

What do you mean by "recompile" ? mod_perl ? What error are you getting?

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] recompile gforum In reply to
well doesnt gforum save the settings / templates, compile them so they're faster and then run the compiled ones until you change the settings or templates again?

referr to my other thread about the error, for some reason i wasn't able to reply
Quote Reply
Re: [meat bone] recompile gforum In reply to
Hi,

You will find the .compiled files in /admin/templates/default/compiled (or whatever template set you are using). I'm not too sure that would be causing your issue though - but I guess its worth a try.

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] recompile gforum In reply to
it didn't fix my problem, however in my error logs it appears the error is coming from db.cgi, so i executed it in the command line and this was my error:

Quote:
Invalid template 'db.html' requested (File does not exist) at (eval 6) line 35.

i cannot find any evidence of any db.html on my machine or in any of my previous backed up versions.

this was my full response:
Quote:
#!/usr/local/bin/perl
# ==================================================================
# Gossamer Forum - Advanced web community
#
# Website : http://gossamer-threads.com/
# Support : http://gossamer-threads.com/scripts/support/
# CVS Info :
# Revision : $Id: db.cgi,v 1.11.2.1 2003/02/09 03:56:09 jagerman Exp $
#
# Copyright (c) 2003 Gossamer Threads Inc. All Rights Reserved.
# Redistribution in part or in whole strictly prohibited. Please
# see LICENSE file for full details.
# ==================================================================
#
use lib '/var/www/fgfrefugees.ca/htdocs/cgi-bin/admin';


use strict;
use GForum qw/$IN $DB $CFG/;
use GForum::Admin;
GForum::init('/var/www/fgfrefugees.ca/htdocs/cgi-bin/admin');

$GForum::TEMPLATE_SET = "admin";

$|++;

main();

sub main {
# ------------------------------------------------------------------
# Main admin loop, displays html pages and other admin tasks.
#
local $SIG{__DIE__} = \&GForum::fatal;
print $IN->header();
my $admin = new GForum::Admin;
print($admin);
if ($admin->for_me($IN)) {
$admin->debug_level($GForum::DEBUG) if ($GForum::DEBUG);
$admin->process ( db => $DB, cgi => $IN );
}
else {
$IN->param('page', 'db.html');
GForum::page();
}
}
[root@vultr /var/www/fgfrefugees.ca/htdocs/cgi-bin/admin]# perl /var/www/fgfrefugees.ca/htdocs/cgi-bin/admin/db.cgi
defined(@array) is deprecated at /var/www/fgfrefugees.ca/htdocs/cgi-bin/admin/GT/Base.pm line 231.
(Maybe you should just omit the defined()?)
defined(%hash) is deprecated at /var/www/fgfrefugees.ca/htdocs/cgi-bin/admin/bases.pm line 43.
(Maybe you should just omit the defined()?)
defined(%hash) is deprecated at /var/www/fgfrefugees.ca/htdocs/cgi-bin/admin/GT/SQL/Base.pm line 593.
(Maybe you should just omit the defined()?)
GT::Config (22733): Loading '/var/www/fgfrefugees.ca/htdocs/cgi-bin/admin/defs/database.def' with options: inheritance => '0', local => '0', cache => '1', create_ok => '1', empty => '0', chmod => '438', strict => '0', debug => '1', compile_subs => '' at /var/www/fgfrefugees.ca/htdocs/cgi-bin/admin/GT/Config.pm line 145.
GT::Config (22733): Not loading '/var/www/fgfrefugees.ca/htdocs/cgi-bin/admin/defs/database.def' from cache at /var/www/fgfrefugees.ca/htdocs/cgi-bin/admin/GT/Config.pm line 163.
GT::Config (22733): Adding '/var/www/fgfrefugees.ca/htdocs/cgi-bin/admin/defs/database.def' to the regular cache at /var/www/fgfrefugees.ca/htdocs/cgi-bin/admin/GT/Config.pm line 177.
Content-type: text/html

GForum::Admin=HASH(0x80234c0d8)<p><font face='Tahoma,Arial,Helvetica' size=2>A fatal error has occurred:</font></p><blockquote><pre>Invalid template 'db.html' requested (File does not exist) at (eval 6) line 35.
</pre></blockquote><p><font face='Tahoma,Arial,Helvetica' size=2>Please enable debugging in setup for more details.</font></p>
<pre><b>Stack Trace</b>
======================================
GForum (22733): GForum::page called at /var/www/fgfrefugees.ca/htdocs/cgi-bin/admin/db.cgi line 43 with no arguments.
GForum (22733): main::main called at /var/www/fgfrefugees.ca/htdocs/cgi-bin/admin/db.cgi line 27 with no arguments.


<b>System Information</b>
======================================
Perl Version: v5.20.3
Gossamer Forum Version: 1.2.4
GForum.pm version: 1.133
GT::SQL Version: 1.111
GT::Template Version: 2.163
Running under mod_perl: No
Running under SpeedyCGI: No
@INC =
/var/www/fgfrefugees.ca/htdocs/cgi-bin/admin
/usr/local/lib/perl5/site_perl/mach/5.20
/usr/local/lib/perl5/site_perl
/usr/local/lib/perl5/5.20/mach
/usr/local/lib/perl5/5.20
/usr/local/lib/perl5/site_perl/5.20
/usr/local/lib/perl5/site_perl/5.20/mach
.
$!: No such file or directory

<b>CGI INPUT</b>
======================================
page => db.html


<b>ENVIRONMENT</b>
======================================
BLOCKSIZE => K
GT_TMPDIR => /var/www/fgfrefugees.ca/htdocs/cgi-bin/admin/tmp
HOME => /root
LOGNAME => root
MAIL => /var/mail/root
OLDPWD => /var/www/fgfrefugees.ca/htdocs/cgi-bin/admin/templates/admin/local
PAGER => more
PATH => /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin
PWD => /var/www/fgfrefugees.ca/htdocs/cgi-bin/admin
SHELL => /usr/local/bin/bash
SHLVL => 1
SSH_TTY => /dev/pts/0
TERM => xterm
USER => root
_ => /usr/local/bin/perl
</pre>Invalid template 'db.html' requested (File does not exist) at (eval 6) line 35.
Quote Reply
Re: [meat bone] recompile gforum In reply to
ok i accidentally executed the full response in my shell and now nothing works

i'm getting boo boo's everywhere

how on earth am i going to fix this?Mad
Quote Reply
Re: [meat bone] recompile gforum In reply to
Hi,

What version of Perl are you on? Trying to remember, did I send you some updated GLinks library files? Cos these errors make me think you are on a later version of Perl:

Quote:
defined(@array) is deprecated at /var/www/fgfrefugees.ca/htdocs/cgi-bin/admin/GT/Base.pm line 231.
(Maybe you should just omit the defined()?)
defined(%hash) is deprecated at /var/www/fgfrefugees.ca/htdocs/cgi-bin/admin/bases.pm line 43.
(Maybe you should just omit the defined()?)
defined(%hash) is deprecated at /var/www/fgfrefugees.ca/htdocs/cgi-bin/admin/GT/SQL/Base.pm line 593.
(Maybe you should just omit the defined()?)

Its a pig to fix (I have the fixed GT ones, but I expect there are other GForum libraries that need fixing as well).

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] recompile gforum In reply to
Andy wrote:
Hi,

What version of Perl are you on? Trying to remember, did I send you some updated GLinks library files? Cos these errors make me think you are on a later version of Perl:

Quote:
defined(@array) is deprecated at /var/www/fgfrefugees.ca/htdocs/cgi-bin/admin/GT/Base.pm line 231.
(Maybe you should just omit the defined()?)
defined(%hash) is deprecated at /var/www/fgfrefugees.ca/htdocs/cgi-bin/admin/bases.pm line 43.
(Maybe you should just omit the defined()?)
defined(%hash) is deprecated at /var/www/fgfrefugees.ca/htdocs/cgi-bin/admin/GT/SQL/Base.pm line 593.
(Maybe you should just omit the defined()?)


Its a pig to fix (I have the fixed GT ones, but I expect there are other GForum libraries that need fixing as well).

Cheers

quite certain it's not that, this error in the admin panel only happened after i changed the folder path. i updated the path in every file.

something is screwed up big time, i can't even find the version i'm using in shell

Quote:
[root@vultr /usr/local/bin]# perl5 --help
[root@vultr /usr/local/bin]# perl --help
[root@vultr /usr/local/bin]#

now as you can see, even gforum.cgi is producing the error now

https://fgfrefugees.ca
Quote Reply
Re: [meat bone] recompile gforum In reply to
Hi,

Version is found using:

Code:
perl --version

It's hard to know based on just that error message. I could take a look if you send logins over, but I can't guarantee when it'll be, as I'm bogged down with other work atm. I would need SFTP/SSH access as the user in question, so I can test stuff directly in ssh.

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] recompile gforum In reply to
Andy wrote:
Hi,

Version is found using:

Code:
perl --version


It's hard to know based on just that error message. I could take a look if you send logins over, but I can't guarantee when it'll be, as I'm bogged down with other work atm. I would need SFTP/SSH access as the user in question, so I can test stuff directly in ssh.

Cheers
yeah i tried that too but nothing is happening, i'm not getting any output.

Quote:
[root@vultr ~]# perl --version
[root@vultr ~]#
Quote Reply
Re: [meat bone] recompile gforum In reply to
Oh weird. That should work (as should perl -v)

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] recompile gforum In reply to
Andy wrote:
Oh weird. That should work (as should perl -v)

Cheers

so i found out perl was just gone, so i built a new installation of perl the same version, reinstalled gforum from scratch then edited my templates and config so everything works now

is there any irc channel for gossamer???
Quote Reply
Re: [meat bone] recompile gforum In reply to
Ah ok - that does sound a bit weird!!!

Quote:
is there any irc channel for gossamer???

Not as far as I'm aware.

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] recompile gforum In reply to
are there any docs for this forum? i'm trying to execute some sql statement but no docs and the horrible way sql queries are handled is driving me nuts

Code:
SELECT post_id, post_username, post_subject, FROM_UNIXTIME(post_time) FROM gforum_Post
WHERE MONTH(FROM_UNIXTIME(post_time)) = MONTH(CURRENT_TIMESTAMP)-1
AND YEAR(FROM_UNIXTIME(post_time)) = YEAR(CURRENT_TIMESTAMP);

that's the query i need to execute, could you help?
Quote Reply
Re: [meat bone] recompile gforum In reply to
Hi,

What are you trying to achieve with it? Look for posts in a range? post_time is just an epoch timestamp ( https://www.epochconverter.com/)

If you just want to do a date range search for between the 1st of November 2017, to the 30th of Nov, you would just do:

Code:
SELECT post_id, post_username, post_subject, post_time FROM gforum_Post WHERE post_time BETWEEN 1509494400 AND 1512000000

If you look further down on that page, you can see some examples in different programming languages, on how to get those values.

Hope that helps

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!