xoops forums

babay

Just popping in
Posted on: 2016/1/10 20:10
babay
babay (Show more)
Just popping in
Posts: 6
Since: 2003/12/28
#1

XOOPS error after PHP upgrade

Hello! I use xoops ver 2.3.
Hosting upgrade PHP. Now PHP 5.5
After upgrade site no open.
Blank screen and this:
PHP Fatal error: Call to a member function prefix() on a non-object in /home/u***/***.ru/www/kernel/configitem.php on line 294

function getObjects($criteria null$id_as_key false)
    {
        
$ret = array();
        
$limit $start 0;
        
$sql 'SELECT * FROM '.$this->db->prefix('config');
        if (isset(
$criteria) && is_subclass_of($criteria'criteriaelement')) {
            
$sql .= ' '.$criteria->renderWhere();
            
$sql .= ' ORDER BY conf_order ASC';
            
$limit $criteria->getLimit();
            
$start $criteria->getStart();
        }
        
$result $this->db->query($sql$limit$start);
        if (!
$result) {
            return 
false;
        }
        while (
$myrow $this->db->fetchArray($result)) {
            
$config = new XoopsConfigItem();
            
$config->assignVars($myrow);
            if (!
$id_as_key) {
                
$ret[] =& $config;
            } else {
                
$ret[$myrow['conf_id']] =& $config;
            }
            unset(
$config);
        }
        return 
$ret;
    }

Line 294 this:
$sql 'SELECT * FROM '.$this->db->prefix('config');


how to solve a problem?*/

Mamba

Moderator
Posted on: 2016/1/10 23:36
Mamba
Mamba (Show more)
Moderator
Posts: 10799
Since: 2004/4/23
#2

Re: XOOPS error after PHP upgrade

Quote:
how to solve a problem?*/

Please upgrade to XOOPS 2.5.7.2

Please read the XOOPS Installation Guide, and in particular the chapter:

Upgrading from XOOPS 2.0. above 2.0.14 and 2.2

Please make sure that you also update your modules that you're currently using, otherwise you'll have the same problems with PHP version not being compatible.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

babay

Just popping in
Posted on: 2016/1/12 20:50
babay
babay (Show more)
Just popping in
Posts: 6
Since: 2003/12/28
#3

Re: XOOPS error after PHP upgrade

Many thanks! All ok!

Mamba

Moderator
Posted on: 2016/1/13 0:38
Mamba
Mamba (Show more)
Moderator
Posts: 10799
Since: 2004/4/23
#4

Re: XOOPS error after PHP upgrade

Great to hear that we have another happy user!
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs