Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Upgrading from v7.02.07 to v9 failed

Asked Modified Viewed 2,585 times
D
Daywalker
D
"Might and Greed will never outweigh Honor and Loyalty"

Come join us for IRC Support: Here
  • Member, joined since
  • Contributed 152 posts on the community forums.
  • Started 31 threads in the forums
  • Started this discussions
asked
Member

So, following the instructions of the included Readme. My server has MySQL 5.1, with PHP 5.6. I upload all of the v9 files to the server. Then I go to mysite.com/install.php obviously changing mysite.com for my site. I check through the license stuff and get to the portion where the config file populates the host details, click to go to I believe it is Step 4 where I'm to input the admin details? Well after clicking to get to step 4, all I get is Access Denied. I have confirmed that all the details in config.php are correct from the host, to the database, to the database user, to the password. I've even changed the password to ensure it was correct.
0 replies

5 posts

F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

Remove all old Infusions from your Infusions directory, I think it is some rights there.
Once Installation have completed you can push em back 1 by 1 and see what fails.
0 replies
D
Daywalker
D
"Might and Greed will never outweigh Honor and Loyalty"

Come join us for IRC Support: Here
  • Member, joined since
  • Contributed 152 posts on the community forums.
  • Started 31 threads in the forums
  • Started this discussions
answered
Member

That worked to allow the site to complete the installation. Maybe a quick edit to the instruction readme should suggest removing all infusions in the Upgrade portion.

However, now I cannot log into the website at all. It redirects me without logging me in. I haven't removed all the old files yet, could this be a cause as well? Going to remove them anyway, as they're useless and shouldn't be kept however wanted to post this in case it was something else.
0 replies
N
NetriX
N
NetriX 10
Need help? Having trouble?
» View our Documentation for guides, functions and more - including the Getting Started section!
» Attach Log Files and Screenshots when reporting issues
» My support days are usually Mon-Thurs. Send me a PM if urgent.
  • Senior Member, joined since
  • Contributed 566 posts on the community forums.
  • Started 93 threads in the forums
answered
Senior Member

Quote

That worked to allow the site to complete the installation. Maybe a quick edit to the instruction readme should suggest removing all infusions in the Upgrade portion.

However, now I cannot log into the website at all. It redirects me without logging me in. I haven't removed all the old files yet, could this be a cause as well? Going to remove them anyway, as they're useless and shouldn't be kept however wanted to post this in case it was something else.
- by Daywalker


This should solve that issue:

Quote

All user_level's remained the same after upgrading.

101 -> 101

Proper levels should include "-" if I'm correct, regardless the logins for member's do not work after upgrading.

Ended up fixing through a sql query:

UPDATE fusion_users SET user_level = '-103' WHERE fusion_users.user_level = '103'
UPDATE fusion_users SET user_level = '-102' WHERE fusion_users.user_level = '102'
UPDATE fusion_users SET user_level = '-101' WHERE fusion_users.user_level = '101'

- by NetriX
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

The first process of the Installer is to detect and change the deviations of your table vs fusion core v9 table. After finishing that, then we detect your version, and runs all the include file. In version 7 case, it will automatically fetch the 9.02 upgrade file in the upgrade folder.

I will show you this line:
https://github.com/PHPFusion/PHPFusion/blob/9.03/upgrade/9.0.upgrade.inc#L318-L334


if (db_exists(DB_PREFIX.'users')) {
    // Modify All Users Level > 0
    $result = dbquery("SELECT user_id, user_level FROM ".DB_USERS);
    if (dbrows($result) > 0) {
        while ($data = dbarray($result)) {
            if ($data['user_level']) { // will omit 0
                $result = dbquery("UPDATE ".DB_USERS." SET user_level='-".$data['user_level']."' WHERE user_id='".$data['user_id']."'");

// i added these in my localhost to try to debug
die();
print_p(dbarray(dbquery("SELECT * FROM ".DB_USERS." WHERE user_id =:user_id" , [':user_id' => $data['user_id']);
// results printed OK.

            }
        }
    }
    // Remove user_offset which had been replaced with user_timezone
    if (column_exists(DB_USERS, 'user_offset')) {
        $inf_altertable[] = DB_USERS." DROP COLUMN user_offset";
    }
}


I don't know what to fix here...
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

I'm giving out code to upgrade your user database on a separate file. Please read my codes and know what you're doing before running this.

Please double verify with a backup database convert first.

Make a new file and place in root - update_users.php

<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) PHPFusion Inc
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: update_users.php
| Author: PHPFusion Development Team
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once dirname(__FILE__).'/../maincore.php';
require_once THEMES.'templates/header.php';
ini_set('post_max_size','750M');
ini_set('upload_max_filesize', '750M');
ini_set('upload_max_filesize', '750M');
ini_set('max_execution_time', '300');
ini_set('max_input_time', '540');
ini_set('memory_limit', '1000M');
$result = dbquery("SELECT user_id, user_level FROM ".DB_USERS." ORDER BY user_id ASC");
if (dbrows($result)) {
    // Column Upgrade
    dbquery("ALTER TABLE ".DB_USERS." ALTER COLUMN user_level TINYINT(4) NOT NULL DEFAULT '".USER_LEVEL_MEMBER."'");
    dbquery("ALTER TABLE ".DB_USERS." ADD COLUMN user_timezone VARCHAR(50) DEFAULT 'Europe/London' AFTER user_hide_email");
    dbquery("ALTER TABLE ".DB_USERS." ADD COLUMN user_reputation INT(10) UNSIGNED DEFAULT '0' AFTER user_status");
    dbquery("ALTER TABLE ".DB_USERS." ADD COLUMN user_inbox SMALLINT(6) UNSIGNED DEFAULT '0' AFTER user_reputation");
    dbquery("ALTER TABLE ".DB_USERS." ADD COLUMN user_outbox SMALLINT(6) UNSIGNED DEFAULT '0' AFTER user_inbox");
    dbquery("ALTER TABLE ".DB_USERS." ADD COLUMN user_archive SMALLINT(6) UNSIGNED DEFAULT '0' AFTER user_outbox");
    dbquery("ALTER TABLE ".DB_USERS." ADD COLUMN user_pm_email_notify TINYINT(1) DEFAULT '0' AFTER user_archive");
    dbquery("ALTER TABLE ".DB_USERS." ADD COLUMN user_pm_save_sent TINYINT(1) DEFAULT '0' AFTER user_pm_email_notify");
    dbquery("ALTER TABLE ".DB_USERS." ADD COLUMN user_actiontime INT(10) UNSIGNED DEFAULT '0' AFTER user_pm_save_sent");
    dbquery("ALTER TABLE ".DB_USERS." ADD COLUMN user_language VARCHAR(50) DEFAULT 'English'");
    while ($data = dbarray($result)) {
        // Change user level status
        if ($data['user_level']) {
            dbquery("UPDATE ".DB_USERS." SET user_level=:level WHERE user_id=:user_id", [':level'=>'-'.$data['user_level'], ':user_id'=>$data['user_id']]);
        }
    }
    addNotice('success', 'Upgrade Users Successful');
}
require_once THEMES.'templates/footer.php';
0 replies

Category Forum

Upgrading issues - 9

Labels

None yet

Statistics

  • Views 0 views
  • Posts 5 posts
  • Votes 0 votes
  • Topic users 4 members

4 participants

F
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
D
D
"Might and Greed will never outweigh Honor and Loyalty"

Come join us for IRC Support: Here
  • Member, joined since
  • Contributed 152 posts on the community forums.
  • Started 31 threads in the forums
  • Started this discussions
N
N
NetriX 10
Need help? Having trouble?
» View our Documentation for guides, functions and more - including the Getting Started section!
» Attach Log Files and Screenshots when reporting issues
» My support days are usually Mon-Thurs. Send me a PM if urgent.
  • Senior Member, joined since
  • Contributed 566 posts on the community forums.
  • Started 93 threads in the forums
C
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet