Welcome, Guest. Please login or register.
Did you miss your activation email?
May 24, 2012, 08:39:48 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155469 Posts in 21707 Topics by 7732 Members
Latest Member: DarrellDD
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Fatal error (fixed! thanks)  (Read 597 times)
Jan de Ronde

Offline Offline

Posts: 13


« on: November 30, 2008, 04:56:26 PM »

Hello please help.

Sometimes when i go to the website comes a error.

Fatal error: Call to a member function numRows() on a non-object in /mnt/web7/31/07/51899607/htdocs/framework/frontend.functions.php on line 192

Bud its not every time just sometimes, when i klik on F5 the website is oke??

Anybody now what the problem is and how to fix?

Thanks
« Last Edit: December 01, 2008, 12:19:21 AM by Jan de Ronde » Logged
thorn

Offline Offline

Posts: 980


WWW
« Reply #1 on: November 30, 2008, 06:13:11 PM »

Hello,

database-connection get lost?

To figure out whats going on, you have to alter the file framework/frontend.functions.php at line 192.
Look for
Code:
  $query_sections = $database->query("SELECT section_id,module,publ_start,publ_end FROM ".TABLE_PREFIX."sections WHERE page_id = '".$page_id."' AND block = '$block' ORDER BY position");
  // If none were found, check if default content is supposed to be shown
  if($query_sections->numRows() == 0) {
and insert an additional line
Code:
  $query_sections = $database->query("SELECT section_id,module,publ_start,publ_end FROM ".TABLE_PREFIX."sections WHERE page_id = '".$page_id."' AND block = '$block' ORDER BY position");

  if(!$query_sections) trigger_error('SQL failed: '.$database->get_error(), E_USER_ERROR);

  // If none were found, check if default content is supposed to be shown
  if($query_sections->numRows() == 0) {
Will print the reason why it fails.

Remove the inserted line afterwards.

thorn.
Logged

Jan de Ronde

Offline Offline

Posts: 13


« Reply #2 on: November 30, 2008, 07:04:54 PM »

thorn,

Thanks for helping me.

I did what you told me to do. I insert

 if (!$query_sections) trigger_error('SQL failed: '.$database->get_error(), E_USER_ERROR);

and Upload framework/frontend.functions.php

Go to the website and Stil get the same error.

No extra info is there?

did something rong?

Thanks
Logged
thorn

Offline Offline

Posts: 980


WWW
« Reply #3 on: November 30, 2008, 07:29:08 PM »

Hello,

maybe you have to set Error_Level to E_ALL in Settings->Advanced Options.

thorn.
Logged

Jan de Ronde

Offline Offline

Posts: 13


« Reply #4 on: November 30, 2008, 08:08:55 PM »

Hello,

Sorry i dont understand what to do.

Please can you told me how to do: set Error_Level to E_ALL in Settings->Advanced Options

Thanks for the answers
Logged
thorn

Offline Offline

Posts: 980


WWW
« Reply #5 on: November 30, 2008, 08:56:01 PM »

Hello,

login into Admin-Area, choose "Settings", click on "Show Advanced Options".
There you will find a dropdown about "Error Level", set that to E_ALL.
See the attached image.

thorn.

will be back tomorrow.
Logged

Jan de Ronde

Offline Offline

Posts: 13


« Reply #6 on: November 30, 2008, 10:00:58 PM »

Oké thanks again,

I get this error now:

Fatal error: SQL failed: Table 'DB468124.sections' doesn't exist in /mnt/web7/31/07/51899607/htdocs/framework/frontend.functions.php on line 191

What can i do to fix the problem?

I understand there is a problem with the database, bud dont now howe to fix. Expeciali its not all the time a error.

Logged
Jan de Ronde

Offline Offline

Posts: 13


« Reply #7 on: November 30, 2008, 11:27:01 PM »

Oké i have more information.

The database in the error is NOT the database i use for the website.

The database is a database i used for a banner ad system (openx). In the template i insert this code:

<?php
  //<!--/* OpenX Local Mode Tag v2.6.2 */-->

  // The MAX_PATH below should point to the base of your OpenX installation
  define('MAX_PATH', '/mnt/web7/31/07/51899607/htdocs/banners');
  if (@include_once(MAX_PATH . '/www/delivery/alocal.php')) {
    if (!isset($phpAds_context)) {
      $phpAds_context = array();
    }
    // function view_local($what, $zoneid=0, $campaignid=0, $bannerid=0, $target='', $source='', $withtext='', $context='', $charset='')
    $phpAds_raw = view_local('', 1, 0, 0, '', '', '1', $phpAds_context, '');
  }
  echo $phpAds_raw['html'];
?>

Maybe is this a problem?
Logged
Jan de Ronde

Offline Offline

Posts: 13


« Reply #8 on: December 01, 2008, 12:18:42 AM »

I change the Invocationcode for the ads in the wb template and it seems to be the problem is fixed.

The code i used was a local mode tag now i used a Javascript tag.

thorn thanks a lot, without you i never found the problem!

Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!