Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.3
Author Message
Bigboy177
Worker
Worker



Joined: Jul 07, 2004
Posts: 192

PostPosted: Sun Jul 18, 2004 10:36 am Reply with quote

I've moved my site to a new server... And now I've got two problems... I've moved the SQL table, and I didn't get any errors... I've checked the number of tables and everything is the same on the first and the second site... Smile
Now on my new server I can see... this error at the bottom of my site...

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/kowal/public_html/kowalport/includes/sql_layer.php on line 286

The strangest thing is that this error is only visible if someone is logged in... It's visible on the mainpage... and it disappears in the Admin Panel... and in most of the modules... What can be wrong... I've checked the sql_layer.php and it's the same exact size on the first page...

I've also got another error... this one is visible when I enter forums or private messages...

Warning: ob_start(): output handler 'ob_gzhandler' cannot be used twice in /home/kowal/public_html/kowalport/includes/page_header.php on line 96

What Can I do to fix these...

This is how these files look like...

sql-layer.php

Code:


function sql_fetch_row(&$res, $nr=0)
{
global $dbtype;
switch ($dbtype) {

    case "MySQL":
        $row = mysql_fetch_row($res); <==== line 286
        return $row;
    break;;

    case "mSQL":
        $row = msql_fetch_row($res);
        return $row;
    break;;

    case "postgres":
    case "postgres_local":
   if ( $res->get_total_rows() > $res->get_fetched_rows() ) {
      $row = pg_fetch_row($res->get_result(), $res->get_fetched_rows() );
      $res->increment_fetched_rows();
      return $row;
   } else {
      return false;
   }
    break;;

    case "ODBC":
    case "ODBC_Adabas":
        $row = array();
        $cols = odbc_fetch_into($res, $nr, $row);
        return $row;
    break;;

    case "Interbase":
        $row = ibase_fetch_row($res);
        return $row;
    break;;

    case "Sybase":
        $row = sybase_fetch_row($res);
        return $row;
    break;;

    default:
    break;;
    }
}


And the page_header.php

Code:


$do_gzip_compress = FALSE;
if ( $board_config['gzip_compress'] )
{
        $phpver = phpversion();

        $useragent = (isset($_SERVER["HTTP_USER_AGENT"]) ) ? $_SERVER["HTTP_USER_AGENT"] : $HTTP_USER_AGENT;

        if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) )
        {
                if ( extension_loaded('zlib') )
                {
                        ob_start('ob_gzhandler'); ===== line 96
                }
        }
        else if ( $phpver > '4.0' )
        {
                if ( strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') )
                {
                        if ( extension_loaded('zlib') )
                        {
                                $do_gzip_compress = TRUE;
                                ob_start();
                                ob_implicit_flush(0);

                                header('Content-Encoding: gzip');
                        }
                }
        }
}

I hope someone will be able to help...
 
View user's profile Send private message
GeekyGuy
Client



Joined: Jun 03, 2004
Posts: 302
Location: Huber Heights Ohio

PostPosted: Sun Jul 18, 2004 11:13 am Reply with quote

I got the same error:
Quote:
Warning: ob_start(): output handler 'ob_gzhandler' cannot be used twice in /home/kowal/public_html/kowalport/includes/page_header.php on line 96

when I set 'Enable GZip Compression' to Yes in the Forums Administration. I went back and turned it off and the error disappeared.

I don't know what causes the error with that enabled, I'll leave that to the phpBB gurus.

_________________
"The Daytona 500 is ours! We won it, we won it, we won it!", Dale Earnhardt, February 15th, 1998, Daytona 500 
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger ICQ Number
Bigboy177







PostPosted: Sun Jul 18, 2004 2:25 pm Reply with quote

Thanks GeekyGuy... I disabled the GZip... And the second error disaooeared... But I still don't know what to do with the first one... Can anyone suggest something... I'm out of ideas...
 
Bigboy177







PostPosted: Sun Jul 18, 2004 4:04 pm Reply with quote

I was wondering if I think good...

This error:

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/kowal/public_html/kowalport/includes/sql_layer.php on line 286

means that in one of my sites' files there's a mysql_fetch_row string which should be according to sql_layer.php - just sql_fetch_row... ??
Am I right... Please give me some directions... I'm a little confused...
 
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Mon Jul 19, 2004 9:01 am Reply with quote

GeekyGuy wrote:
I got the same error:
Quote:
Warning: ob_start(): output handler 'ob_gzhandler' cannot be used twice in /home/kowal/public_html/kowalport/includes/page_header.php on line 96

when I set 'Enable GZip Compression' to Yes in the Forums Administration. I went back and turned it off and the error disappeared.

I don't know what causes the error with that enabled, I'll leave that to the phpBB gurus.
The issue has been there forever. You need to leave it OFF as it is already on in Nuke so it carries over to phpbb. That's where and why the error occurs - called twice Smile
 
View user's profile Send private message
Raven







PostPosted: Mon Jul 19, 2004 9:04 am Reply with quote

BB, you are getting that error/warning because there appears to be an issue with a table and an application calling it. It ususally means that the table has more/less columns that the SQL qury string that is calling it. You can try running a REPAIR on the database through phpMyAdmin and see if that fixes it. If not,set debug to 1 in sql_layer.php and when the error appears on your screen, right above it should be the query string that is calling it.
 
Bigboy177







PostPosted: Mon Jul 19, 2004 9:38 am Reply with quote

I've removed the error... but now I can't disable Debug mode... Sad
The Debug text is still on my site although I set debug=0.... Sad
What can be wrong...
 
Raven







PostPosted: Mon Jul 19, 2004 9:44 am Reply with quote

Make sure you ftp'd it back up. Refresh your cache, cookies, etc. and make sure that you don't have any typos. Make sure that you ftp'd it to the db folder.
 
Bigboy177







PostPosted: Mon Jul 19, 2004 11:00 am Reply with quote

Thanks Raven... I don't know what I would do without you... RavensScripts
and all ppl here at RavensScripts ... Smile

You are simply the Best... Smile
I will add Your Banner on My Site to yours... Smile

Thanks Again... You are Great... Wave


PS. The error I was getting was caused by the script to popup Private Messages Window... When a message Arrives... Maybe you know a script that can do it... or a module... Wink
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.3

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©