You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 39 guest(s) and 2 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Important stuff [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
mikem
Theme Guru
Theme Guru


Joined: Jan 13, 2003
Posts: 1582

Location: Corn fields of Indiana

PostPosted: Sat Feb 01, 2003 4:38 am Reply with quoteBack to top

Still bombs out on line 386 at the fetch row... Confused
Also, ON the upgrade screen for your script at the bottom, I get

Quote:
Warning: (null)() [ref.outcontrol]: output handler 'ob_gzhandler' cannot be used twice in Unknown on line 0


mikem
Find all posts by mikemView user's profileSend private message
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Sat Feb 01, 2003 4:40 am Reply with quoteBack to top

change sql_fetch_row to sql_fetchrow

ArtificialIntel
Find all posts by ArtificialIntelView user's profileSend private message
mikem
Theme Guru
Theme Guru


Joined: Jan 13, 2003
Posts: 1582

Location: Corn fields of Indiana

PostPosted: Sat Feb 01, 2003 4:52 am Reply with quoteBack to top

ArtificialIntel wrote:
change sql_fetch_row to sql_fetchrow

ArtificialIntel


it's already sql_fetchrow
Confused
Find all posts by mikemView user's profileSend private message
mikem
Theme Guru
Theme Guru


Joined: Jan 13, 2003
Posts: 1582

Location: Corn fields of Indiana

PostPosted: Sat Feb 01, 2003 5:55 am Reply with quoteBack to top

Ok just to see the results. I removed the last part of the upgrade script to bypass the error. It was bombing on the Private Messages import part.
After I removed this part
Code:
// Private Messages Migration
$sql = "SELECT * FROM ".$prefix."_priv_msgs";
$result = mysql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
    if ($row[read_msg] == '0') {
   $type = 5;
    } elseif ($row[read_msg] == '1') {
   $type = 0;
    }
    $time = $row[msg_time];
    $both = explode(" ", $time);
    $date = explode("-", $both[0]);
    $time = explode(":", $both[1]);
    $new_time = mktime($time[0],$time[1],$time[2],$date[1],$date[2],$date[0]);
    $uid = md5(mt_rand());
    $uid = substr($uid, 0, 10);
    mysql_query("INSERT INTO ".$prefix."_bbprivmsgs VALUES ('$row[msg_id]', '$type', '$row[subject]', '$row[from_userid]', '$row[to_userid]', '$new_time', '00000000', '1', '1', '1', '0')");
    mysql_query("INSERT INTO ".$prefix."_bbprivmsgs_text VALUES ('$row[msg_id]', '$uid', '$row[msg_text]')");
}
mysql_query("DROP TABLE ".$prefix."_priv_msgs");

The upgrade script completed.
However, There are errors in the Forums...

Quote:
Warning: Cannot modify header information - headers already sent by (output started at /www/f/fauxpas69/htdocs/phpbbport/themes/MissionImpossible/theme.php:69) in /www/f/fauxpas69/htdocs/phpbbport/includes/sessions.php on line 198

Warning: Cannot modify header information - headers already sent by (output started at /www/f/fauxpas69/htdocs/phpbbport/themes/MissionImpossible/theme.php:69) in /www/f/fauxpas69/htdocs/phpbbport/includes/sessions.php on line 199


It's DARN close to being a workign Upgrade script for Nuke6.0 and phpBB 2.0.6 to Nuke 6.5... Very Happy
Find all posts by mikemView user's profileSend private message
chatserv
General
General


Joined: Jan 12, 2003
Posts: 3128

Location: Puerto Rico

PostPosted: Sat Feb 01, 2003 9:50 pm Reply with quoteBack to top

If you check both here and at phpnuke.org you'll notice this header error exists so it can't be the upgrade script, just comment out lines 198 & 199 in sessions.php to get rid of it,

_________________
Feed a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
ScriptHeaven | NukeResources
Find all posts by chatservView user's profileSend private messageVisit poster's website
chatserv
General
General


Joined: Jan 12, 2003
Posts: 3128

Location: Puerto Rico

PostPosted: Sat Feb 01, 2003 9:56 pm Reply with quoteBack to top

What i was trying now was to re-insert the require("config.php"); and changing the PM code to:
Code:

// Private Messages Migration
global $prefix, $dbi;
$result = sql_query("SELECT * FROM ".$prefix."_priv_msgs", $dbi);
while(list($read_msg, $msg_time) = sql_fetch_row($result, $dbi)) {
    if ($read_msg == '0') {
   $type = 5;
    } elseif ($read_msg == '1') {
   $type = 0;
    }
    $time = $msg_time;
    $both = explode(" ", $time);
    $date = explode("-", $both[0]);
    $time = explode(":", $both[1]);
    $new_time = mktime($time[0],$time[1],$time[2],$date[1],$date[2],$date[0]);
    $uid = md5(mt_rand());
    $uid = substr($uid, 0, 10);
    mysql_query("INSERT INTO ".$prefix."_bbprivmsgs VALUES ('$msg_id', '$type', '$subject', '$from_userid', '$to_userid', '$new_time', '00000000', '1', '1', '1', '0')");
    mysql_query("INSERT INTO ".$prefix."_bbprivmsgs_text VALUES ('$msg_id', '$uid', '$msg_text')");
}
mysql_query("DROP TABLE ".$prefix."_priv_msgs");

You could try doing this and removing all other update parts.

_________________
Feed a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
ScriptHeaven | NukeResources
Find all posts by chatservView user's profileSend private messageVisit poster's website
mikem
Theme Guru
Theme Guru


Joined: Jan 13, 2003
Posts: 1582

Location: Corn fields of Indiana

PostPosted: Sun Feb 02, 2003 8:06 am Reply with quoteBack to top

ok let's try again.
I'm going to put the PM fixed code into the entire upgrade script. I'll also change the includes back to config.php instead of mainfile.php.
I'm going to drop my Database and reload my saved DB from nuek 6.0 and 2.0.6 port and try the Ugrad script again...

BRB..hehe

mikem
Find all posts by mikemView user's profileSend private message
mikem
Theme Guru
Theme Guru


Joined: Jan 13, 2003
Posts: 1582

Location: Corn fields of Indiana

PostPosted: Sun Feb 02, 2003 8:14 am Reply with quoteBack to top

well CRAP...trying to run the upgrade script again.

Code:

Fatal error: Call to undefined function: sql_query() in /www/f/fauxpas69/htdocs/phpbbport/nukebbsql.php on line 385


Thats' a legitimate SQL query on line 385 in your upgrade script..dangitt. Confused
Find all posts by mikemView user's profileSend private message
chatserv
General
General


Joined: Jan 12, 2003
Posts: 3128

Location: Puerto Rico

PostPosted: Sun Feb 02, 2003 8:22 am Reply with quoteBack to top

Odd indeed, try changing sql_query to mysql_query

_________________
Feed a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
ScriptHeaven | NukeResources
Find all posts by chatservView user's profileSend private messageVisit poster's website
mikem
Theme Guru
Theme Guru


Joined: Jan 13, 2003
Posts: 1582

Location: Corn fields of Indiana

PostPosted: Sun Feb 02, 2003 8:27 am Reply with quoteBack to top

Ok I think I got it to work. I added a function for the prvmsg upgrade part and that seemed to do it.
Unfortunately, I did not have any Private messages so I don't know if it imported the PM's since I had none Confused

No matter though. Teh PM upgrade part is actually pulling the PM's from the Nuke side and inserting them into the BB PM side.
bb Private messages are already there. Thsi part would just be needed if you use the Nuke PM system and want to migrate your PM's over to the Forums side...

Code:
function prvmsg(){

// Private Messages Migration
global $prefix, $dbi;
$result = sql_query("SELECT * FROM ".$prefix."_priv_msgs", $dbi);
while(list($read_msg, $msg_time) = sql_fetch_row($result, $dbi)) {
    if ($read_msg == '0') {
   $type = 5;
    } elseif ($read_msg == '1') {
   $type = 0;
    }
    $time = $msg_time;
    $both = explode(" ", $time);
    $date = explode("-", $both[0]);
    $time = explode(":", $both[1]);
    $new_time = mktime($time[0],$time[1],$time[2],$date[1],$date[2],$date[0]);
    $uid = md5(mt_rand());
    $uid = substr($uid, 0, 10);
    mysql_query("INSERT INTO ".$prefix."_bbprivmsgs VALUES ('$msg_id', '$type', '$subject', '$from_userid', '$to_userid', '$new_time', '00000000', '1', '1', '1', '0')");
    mysql_query("INSERT INTO ".$prefix."_bbprivmsgs_text VALUES ('$msg_id', '$uid', '$msg_text')");
}
mysql_query("DROP TABLE ".$prefix."_priv_msgs");
}


mikem
Find all posts by mikemView user's profileSend private message
mikem
Theme Guru
Theme Guru


Joined: Jan 13, 2003
Posts: 1582

Location: Corn fields of Indiana

PostPosted: Sun Feb 02, 2003 8:34 am Reply with quoteBack to top

Ok let's re-cap.

chatserv.
The upgrade script seems to be working now.
Upgrading from PHP-Nuke 6.0 with phpBB port 2.0.6 to Nuke 6.5 beta6.

Steps:
1. Uploaded ALL Nuke 6.5 files, overwriting exisiting Nuke 6.0 files to FTP.
2. Uploaded your Upgrade script to root directory.
3. Pointed browser to upgrade script and BAM all done.

Seems to be woking. I am going to drop my DB again and load my saved one from Nuke 6.0 and try the upgrade script again to be sure.

Other notes.
your above post for the headers problem in the Forums workes fine.
Comment out lines 198 and 199 in includes/sessions.php

I also ran a DIFF on the tables from Nuek 6.0 before my upgrade and then after. It appears all the fields that changed in the DB tables were correctly changed by your upgrade script!

mikem
Find all posts by mikemView user's profileSend private message
chatserv
General
General


Joined: Jan 12, 2003
Posts: 3128

Location: Puerto Rico

PostPosted: Sun Feb 02, 2003 8:38 am Reply with quoteBack to top

If it works as intended zip the upgrade file and upload it, have you downloaded beta 7 yet? if so does the upgrade script for it vary at all? i would imagine it wouldn't.

_________________
Feed a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
ScriptHeaven | NukeResources
Find all posts by chatservView user's profileSend private messageVisit poster's website
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Sun Feb 02, 2003 8:41 am Reply with quoteBack to top

Ive got Beta 7 running on my main site now. It's got no database changes as far as I can see (I only replaced the files, and so far it all seems to be working a-ok - didn't touch the database at all).

Artificialintel
Find all posts by ArtificialIntelView user's profileSend private message
mikem
Theme Guru
Theme Guru


Joined: Jan 13, 2003
Posts: 1582

Location: Corn fields of Indiana

PostPosted: Sun Feb 02, 2003 8:42 am Reply with quoteBack to top

chatserv wrote:
If it works as intended zip the upgrade file and upload it, have you downloaded beta 7 yet? if so does the upgrade script for it vary at all? i would imagine it wouldn't.


BETA 7???
Man I just got beta6 a week ago.
I'm sure the table structure and fields in the DB are the same. FB made all his major changes to the DB from beta5 to 6. I doubt we will see anymore major table changes(HOPEFULLY)

I'll D/L beta7 and look at it to make sure no changes were made that would warrant any changes to the upgrade script.

How many times did I type changes? lmao

mikem
Find all posts by mikemView user's profileSend private message
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Sun Feb 02, 2003 8:44 am Reply with quoteBack to top

4 Wink

ArtificialIntel
Find all posts by ArtificialIntelView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.769 Seconds - 305 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::