Links

Upgrading the Xoops Portal

You Must be on Xoops 2.3.X or higer to apply this upgrade to Xoops 2.4.0
To verify, login and click Administration Menu.
The Version is shown near the bottom of the page by the footer.


Download: http://www.peakapi.com/uploads/upgrade-Xoops-2.4.0.zip

cp -p mainfile.php mainfile.php.
unzip upgrade-Xoops-2.4.0.zip (Extract at your htdocs (httpdocs) folder level)
overwrite all files if prompted
chown -R devpeakapi:psacln *
chmod 777 mainfile.php
chmod 777 xoops_data/configs (is this on install page?)
chmod 777 include/license.php

Access your url/upgrade
Click the "update system module" at the end of the process
Then Update


rm -rf install
rm -rf upgrade


EDIT mainfile.php

The drawback is that the upgrade rewrite the mainfile.php

NEW mainfile.php end of file looks like:



define
'XOOPS_GROUP_ADMIN''1' );
    
define'XOOPS_GROUP_USERS''2' );
    
define'XOOPS_GROUP_ANONYMOUS''3' );

    if (!isset(
$xoopsOption["nocommon"]) && XOOPS_ROOT_PATH != "") {
        include 
XOOPS_ROOT_PATH."/include/common.php";
    }

}



ADD YOUR WHMCS BACK TO mainfile.php to make it look like:



define
'XOOPS_GROUP_ADMIN''1' );
    
define'XOOPS_GROUP_USERS''2' );
    
define'XOOPS_GROUP_ANONYMOUS''3' );

    
// ADDED FOR PEAKBACKUP - NOT XOOPS NATIVE
        
$encrypt_key "spoox";  //Change this - NEVER CHANGE OR LOSE
        
include XOOPS_ROOT_PATH '/modules/acctmgmt/includes/std.encryption.class.php';
    
// END ADDED FOR PEAKBACKUP - NOT XOOPS NATIVE

    
if (!isset($xoopsOption["nocommon"]) && XOOPS_ROOT_PATH != "") {
    
//ADDED FOR PEAKBACKUP - NOT XOOPS NATIVE
                
if($forWHMCS==true){
                        
$forWHMCS false;
                        }else{
    
//ADDED FOR PEAKBACKUP - NOT XOOPS NATIVE
          
include XOOPS_ROOT_PATH."/include/common.php";
                }
    }

    
//if (!isset($xoopsOption["nocommon"]) && XOOPS_ROOT_PATH != "") {
    //   include XOOPS_ROOT_PATH."/include/common.php";
    // }
}


NOTE: You can remove the bottom three // lines or keep them. This is used to better illustrate to change.
NOTE: In above example, please make sure your $encrypt_key is the same as before if you've chosen to cut / paste the changes here


chmod 444 mainfile.php

LOGOUT
LOGIN

Ensure your login keeps you logged in. If you login, then immediately get logged off, the mainfile.php edit is incorrect.

Otherwise, you're done. Of course perform some basic functionality checks (create a user, modify, suspend, enable, delete)

There is no more risk than before. The Xoops community now show this at the administration menu page:


WARNING
Folder /var/www/vhosts/peakapi.com/subdomains/dev/httpdocs/xoops_lib is inside DocumentRoot
For 
security considerations it is highly suggested to move it out of DocumentRoot.


WARNINGFolder /var/www/vhosts/peakapi.com/subdomains/dev/httpdocs/xoops_data is inside DocumentRoot
For 
security considerations it is highly suggested to move it out of DocumentRoot.


You can move these folders and them edit mainfile.php with their new location if you desire.
  Send article