Osclass Support Forums

Osclass theme support => Gamma Osclass Theme => Topic started by: Marius on October 05, 2021, 10:05:07 PM

Title: error_log
Post by: Marius on October 05, 2021, 10:05:07 PM
I don't know what happened but I think it's a hack attack
--------------------------------------------------------
[05-Oct-2021 14:49:18 Europe/Bucharest] PHP Warning:  Error while sending QUERY packet. PID=1383506 in /home/pgnro/public_html/oc-includes/osclass/classes/database/DBCommandClass.php on line 954
[05-Oct-2021 14:49:18 Europe/Bucharest] PHP Fatal error:  Uncaught Error: Call to a member function numRows() on boolean in /home/pgnro/public_html/oc-includes/osclass/model/Category.php:126
Stack trace:
#0 /home/pgnro/public_html/oc-includes/osclass/model/Category.php(206): Category->listWhere('b.s_name != '' ...')
#1 /home/pgnro/public_html/oc-includes/osclass/model/Category.php(231): Category->listEnabled()
#2 /home/pgnro/public_html/oc-includes/osclass/model/Category.php(72): Category->toTree()
#3 /home/pgnro/public_html/oc-includes/osclass/model/Category.php(38): Category->__construct('ro_RO')
#4 /home/pgnro/public_html/oc-includes/osclass/helpers/hCategories.php(116): Category::newInstance()
#5 /home/pgnro/public_html/oc-content/themes/gamma/header.php(161): osc_has_categories()
#6 /home/pgnro/public_html/oc-includes/osclass/helpers/hDefines.php(288): require('/home/pgnro/pub...')
#7 /home/pgnro/public_html/oc-content/themes/gamma/item-send-friend.php(32): osc_current_web_theme_path('header.php')
#8 /home/pgnro/public_html/oc-includes/osclass/helpers/hDefines. in /home/pgnro/public_html/oc-includes/osclass/model/Category.php on line 126
[05-Oct-2021 14:49:19 Europe/Bucharest] PHP Warning:  mysqli::query(): MySQL server has gone away in /home/pgnro/public_html/oc-includes/osclass/classes/database/DBCommandClass.php on line 954
[05-Oct-2021 14:49:19 Europe/Bucharest] PHP Warning:  mysqli::query(): Error reading result set's header in /home/pgnro/public_html/oc-includes/osclass/classes/database/DBCommandClass.php on line 954
[05-Oct-2021 14:49:19 Europe/Bucharest] PHP Fatal error:  Uncaught Error: Call to a member function numRows() on boolean in /home/pgnro/public_html/oc-includes/osclass/model/Category.php:126
Stack trace:
#0 /home/pgnro/public_html/oc-includes/osclass/model/Category.php(543): Category->listWhere('a.fk_i_parent_i...', 2)
#1 /home/pgnro/public_html/oc-content/themes/gamma/inc.category.php(21): Category->findSubcategoriesEnabled('2')
#2 /home/pgnro/public_html/oc-includes/osclass/helpers/hDefines.php(288): require('/home/pgnro/pub...')
#3 /home/pgnro/public_html/oc-content/themes/gamma/search.php(17): osc_current_web_theme_path('inc.category.ph...')
#4 /home/pgnro/public_html/oc-includes/osclass/helpers/hDefines.php(288): require('/home/pgnro/pub...')
#5 /home/pgnro/public_html/oc-includes/osclass/controller/search.php(695): osc_current_web_theme_path('search.php')
#6 /home/pgnro/public_html/oc-includes/osclass/controller/search.php(627): CWebSearch->doView('search.php')
#7 /home/pgnro/public_html/index.php(103): CWebSearch->doModel()
#8 {main}
  thrown in /home/pgnro/public_html/oc-includes/osclass/model/Category.php on line 126
Title: Re: error_log
Post by: MB Themes on October 06, 2021, 03:57:40 PM
No it is just some issue with category model.
Go to oc-includes/osclass/model/Category.php and find this code:
Code: [Select]
    if( $rs === false ) {
      $aux = array();
    }

    if( $rs->numRows() == 0 ) {
      $aux = array();
    }
   
    $aux = $rs->result();

change it into:
Code: [Select]
    if( $rs === false ) {
      $aux = array();
    } else if( $rs->numRows() == 0 ) {
      $aux = array();
    } else {   
      $aux = $rs->result();
    }
Title: Re: error_log
Post by: Marius on October 06, 2021, 04:13:10 PM
I changed
thanks again
Title: Re: error_log
Post by: MB Themes on October 06, 2021, 04:20:18 PM
First confirm error does not appear again and everything wirks fine :)