thank you both, very much!
I will join the mailing list, and post the problem there too. I think I did narrow it down...
I used Shell to run the site, and I get these errors:
[Sat Dec 28 10:02:21 2002] index.cgi: (in cleanup) Can't call method "release_all_locks" on an undefined value at /usr/lib/perl5/site_perl/5.6.1/Apache/Session.pm line 599 during global destruction.
and
index.cgi: (in cleanup) Can't call method "update" on an undefined value at /usr/lib/perl5/site_perl/5.6.1/Apache/Session.pm line 508 during global destruction.
The code in my index.cgi file is pretty simple:
#!/usr/bin/perl -w
use CGI::Carp qw(fatalsToBrowser);
use CGI qw(:standard :cgi-lib escapeHTML);
use Mail::Sendmail;
#@ USE_STATEMENTS
use Digest::MD5;
use Crypt::CBC;
use Crypt::Blowfish;
use LWP::UserAgent;
push(@inc, "/home/mydom/my_mods");
use FRHWebDB::Session; # This contains the MySQL connections
#@ USE_STATEMENTS
ReadParse(\%in);
use vars qw($cookie $sess_id $sess_ref $page $logged_in %in);# These a
+re global
$sess_id = cookie ("session_id");
if ($sess_id eq "" && $in{sess_id} ne "") {
$sess_id = $in{sess_id};#if no cookies then it's in the url
}
$sess_ref = FRHWebDB::Session->open_with_expiration(undef, $sess_id) i
+f defined ($sess_id);#Open with Expriration
require "/home/mydom/site/data.conf";#This contains header
# information and other stuff, like menu and things like
# that
if ($in{pg} eq "quit" && defined($sess_ref)) {
if ($sess_ref->attr ("remember_me") == 1) {
$sess_ref->attr ("loggedin", 0);
$message = qq~You have been Logged Out$nname_ws!<br><br>~;#$nn
+ame_ws is their nickname with a # space in front of it, if no nick na
+me then it's blank
# (Out!)
} else {
Delete_Session_Forever($sess_ref);
}
}
if (!defined ($sess_ref))# no session yet, so create one.
{
defined ($sess_ref = FRHWebDB::Session->open (undef, undef))
or error ("Could not create new session: $FRHWebDB::Session::e
+rrstr");
$cookie = cookie (-name => "session_id",
-value => $sess_ref->session_id(),
-path => url (-absolute => 1),
-expires => "+1y"
);#Create the cookie to put on user pc at top_header()
}
get_cookie_values($sess_ref) if defined ($sess_id);#Ok, get
# session values from the $sess_ref [apache::session].
get_company_values() if !defined($sess_id);#No session so
# just define the company variables($co_name and such)
require "/home/mydom/site/config.data";#Ok this one has all
# the javascripts, css and lots of configuration variables,
# and such. Plus a browser check.
#Set expiration of session if none exists.
$sess_ref->expires ($sess_ref->now() + (60*60*24*365)) if !defined ($s
+ess_ref->expires());
$Page_Dir = "/home/mydom/site/pages";#directory where all
# the pages in .conf files are stored.
$pg = $in{pg};
$test_cookie2 = cookie ("session_id");
if (!defined ($test_cookie2)) {#users pc has cookies
# Turned off, so add the session to every link and form
# using the variables I've defined here.
$nocookies = 1;
$inc_sess_id = "&sess_id=" . $sess_ref->session_id();
$hidden_inc_sess_id = hidden(-name=>"sess_id", -value=>$sess_r
+ef->session_id());
} else {#Ok, they do have cookies turned on!
$nocookies = 0;
$inc_sess_id = "";
$hidden_inc_sess_id = "";
}
if (!$pg || !-e "$Page_Dir/$pg.conf") {#No page so load home
require "$Page_Dir/home.conf";
$page .= $page_content;
} elsif(-e "$Page_Dir/$pg.conf") {#Ok there is a page so
# load it instead of home
require "$Page_Dir/$pg.conf";
$page .= $page_content;
}
top_header("$title","","");#ok, now this is in
# data.conf, it is the header and it uses CGI.pm's header()
# start_html() etc.
#ok, now below closes the table and creates the right menu
# if any. right_menu() is defined in config.data
$page .= qq~
</div />
</font />
</p />\n</td />~ . right_menu("in_table_cell","125",$overrideit)
+ . end_page_footer();
print $page;
exit; # Exit system.
That is that. You can see the output at http://www.firstratehosting.com/t/index.cgi
I'm not near finished with it,
I'm trying to get the sessions to work, then I'm going to add an affiliate program to it, then finish the site.
It still does not work though...
If you need to also see the Session.pm code let me know, I'll post that too.
Thank you ever so kindly.
Richard
edited: Sat Dec 28 17:57:25 2002
by jeffa - broke out the Mop of Formatting +42 on this one
|