Advertisement:

Author Topic: Solved:Unable to access admin part (oc-admin)  (Read 1195 times)

Nirav_radia

  • Newbie
  • *
  • Posts: 25
Solved:Unable to access admin part (oc-admin)
« on: December 30, 2016, 04:24:19 pm »
I am trying to access my admin panel but sometime it's not loading  :(

Error log :

[30-Dec-2016 17:07:48 Asia/Kolkata] PHP Fatal error:  Call to a member function numRows() on a non-object in /home/macularmetrics/public_html/oc-includes/osclass/model/Admin.php on line 63
[30-Dec-2016 17:21:25 Asia/Kolkata] PHP Fatal error:  Call to a member function numRows() on a non-object in /home/macularmetrics/public_html/oc-includes/osclass/model/Admin.php on line 63

or sometime its taking long time to load. 

PFA

Help really appreciated.


Thanks

« Last Edit: January 02, 2017, 10:56:24 am by Nirav_radia »

Aficionado

  • Guest
Re: Unable to access admin part (oc-admin)
« Reply #1 on: December 30, 2016, 04:30:56 pm »

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: Unable to access admin part (oc-admin)
« Reply #2 on: December 30, 2016, 05:14:14 pm »
In oc-includes/osclass/model/Admin.php replace lines 61-67 from

Code: [Select]
            $return = $this->dao->query('SHOW COLUMNS FROM ' . $this->getTableName() . ' where Field = "b_moderator" ');

            if( $return->numRows() > 0 ) {
                $this->setFields( array('pk_i_id', 's_name', 's_username', 's_password', 's_email', 's_secret', 'b_moderator') );
            } else {
                $this->setFields( array('pk_i_id', 's_name', 's_username', 's_password', 's_email', 's_secret') );
            }

to

Code: [Select]
                $this->setFields( array('pk_i_id', 's_name', 's_username', 's_password', 's_email', 's_secret', 'b_moderator') );

Aficionado

  • Guest
Re: Unable to access admin part (oc-admin)
« Reply #3 on: December 30, 2016, 05:51:59 pm »
Similar problems also from others using Godaddy hosting.


Nirav_radia

  • Newbie
  • *
  • Posts: 25
Re: Unable to access admin part (oc-admin)
« Reply #4 on: December 30, 2016, 07:02:03 pm »
Thanks for your help . But probem is still there.

Code: [Select]
In oc-includes/osclass/model/Admin.php replace lines 61-67 from

Code: [Select]
            $return = $this->dao->query('SHOW COLUMNS FROM ' . $this->getTableName() . ' where Field = "b_moderator" ');

            if( $return->numRows() > 0 ) {
                $this->setFields( array('pk_i_id', 's_name', 's_username', 's_password', 's_email', 's_secret', 'b_moderator') );
            } else {
                $this->setFields( array('pk_i_id', 's_name', 's_username', 's_password', 's_email', 's_secret') );
            }

to

Code: [Select]
                $this->setFields( array('pk_i_id', 's_name', 's_username', 's_password', 's_email', 's_secret', 'b_moderator') );



I tried this but same problem.


I am able to login directly on listing page

http://********.com/oc-admin/index.php?page=items

So I think there is a problem in oc-admin dashboard & Osclass Market area.

Aficionado

  • Guest