Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6
Author Message
kenshell
New Member
New Member



Joined: May 11, 2005
Posts: 10

PostPosted: Thu May 12, 2005 6:32 pm Reply with quote

7.6 was working fine.
I ran 3.0 patch and got this.
I can ruin a wetdream Sad


phpBB : Critical Error

Error creating new session

DEBUG MODE

SQL Error : 1054 Unknown column 'session_admin' in 'field list'

INSERT INTO nuke_bbsessions (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in, session_admin) VALUES ('08e9c7b6ecd2812ce98abfb07dfcdd42', '1', '1115944229', '1115944229', '458ecf9f', '0', '0', '0')

Line : 203
File : sessions.php
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Thu May 12, 2005 8:03 pm Reply with quote

Did you run the upgradedb.php file? If not, then run it. That should fix it. Here is the latest copy
Code:
<?php 


require_once("mainfile.php");
include("header.php");
title("Correcting username length and session_admin field in db tables");
OpenTable();

$result = $db->sql_query("alter table ".$prefix."_stories change informant informant varchar(25) not null default ''");
if (!$result) { echo "Modification one to ".$prefix."_stories failed<br />\n"; } else { echo "Modification one to ".$prefix."_stories performed<br />\n"; }
$result = $db->sql_query("alter table ".$prefix."_stories change aid aid varchar(25) not null default ''");
if (!$result) { echo "Modification two to ".$prefix."_stories failed<br />\n"; } else { echo "Modification two to ".$prefix."_stories performed<br />\n"; }
$result = $db->sql_query("alter table ".$prefix."_autonews change informant informant varchar(25) not null default ''");
if (!$result) { echo "Modification one to ".$prefix."_autonews failed<br />\n"; } else { echo "Modification one to ".$prefix."_autonews performed<br />\n"; }
$result = $db->sql_query("alter table ".$prefix."_autonews change aid aid varchar(25) not null default ''");
if (!$result) { echo "Modification two to ".$prefix."_autonews failed<br />\n"; } else { echo "Modification two to ".$prefix."_autonews performed<br />\n"; }
$result = $db->sql_query("alter table ".$prefix."_reviews change reviewer reviewer varchar(25) default NULL");
if (!$result) { echo "Modification to ".$prefix."_reviews failed<br />\n"; } else { echo "Modification to ".$prefix."_reviews performed<br />\n"; }
$result = $db->sql_query("alter table ".$prefix."_reviews_add change reviewer reviewer varchar(25) not null default ''");
if (!$result) { echo "Modification to ".$prefix."_reviews_add failed<br><br />\n"; } else { echo "Modification to ".$prefix."_reviews_add performed<br><br />\n"; }
$result = $db->sql_query("ALTER TABLE ".$prefix."_bbsessions ADD COLUMN session_admin tinyint(2) DEFAULT '0' NOT NULL");
if (!$result) { echo "Modification to ".$prefix."_bbsessions failed<br><br />\n"; } else { echo "Modification to ".$prefix."_bbsessions performed<br><br />\n"; }
$result = $db->sql_query("UPDATE ".$prefix."_bbconfig SET config_value='.0.15' where config_name='version'");
if (!$result) { echo "Modification to ".$prefix."_bbconfig failed<br><br />\n"; } else { echo "Modification to ".$prefix."_bbconfig performed<br><br />\n"; }

echo "Correction finished, <b>Delete this file now!</b><br><br />\n";
echo "Back to <a href=\"index.php\">website</a>\n";
CloseTable();
include("footer.php");
 
?>
 
View user's profile Send private message
Raven







PostPosted: Thu May 12, 2005 8:05 pm Reply with quote

Or, just use phpMyAdmin and run this query
Code:
ALTER TABLE nuke_bbsessions ADD COLUMN session_admin tinyint(2) DEFAULT '0' NOT NULL
 
kenshell







PostPosted: Fri May 13, 2005 3:37 am Reply with quote

thanks raven.
that did it.

lemme back it up now Wink

Raven wrote:
Or, just use phpMyAdmin and run this query
Code:
ALTER TABLE nuke_bbsessions ADD COLUMN session_admin tinyint(2) DEFAULT '0' NOT NULL
 
manunkind
Client



Joined: Apr 26, 2004
Posts: 368
Location: Albuquerque, NM

PostPosted: Sun May 15, 2005 9:34 am Reply with quote

I had this problem too. Running the file does not update the DB. I had to do it manually.
 
View user's profile Send private message Visit poster's website
Raven







PostPosted: Sun May 15, 2005 10:32 am Reply with quote

The file that ships with 7.7 does not have that code in it. Chat added it in his 3.0 fixes. That's why I posted the correct one up above and not the one that ships with 7.7
 
Defcon
Regular
Regular



Joined: Mar 10, 2005
Posts: 90

PostPosted: Fri Jul 29, 2005 1:09 am Reply with quote

I also get this problem too. Raven, did u have a complete patch 7.6 where you already did a correction such this error?
 
View user's profile Send private message Visit poster's website
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Fri Jul 29, 2005 3:23 am Reply with quote

The upgrade file is shipped with Chatserv's patched 2.9 and 3.0 series for that version of nuke - see the front page of this site for the download link.
 
View user's profile Send private message Send e-mail
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©