Author |
Message |
Bigboy177
Worker


Joined: Jul 07, 2004
Posts: 192
|
Posted:
Sun Jul 18, 2004 10:36 am |
|
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...
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...
|
|
|
|
|
 |
GeekyGuy
Client

Joined: Jun 03, 2004
Posts: 302
Location: Huber Heights Ohio
|
Posted:
Sun Jul 18, 2004 11:13 am |
|
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 |
|
 |
 |
Bigboy177

|
Posted:
Sun Jul 18, 2004 2:25 pm |
|
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

|
Posted:
Sun Jul 18, 2004 4:04 pm |
|
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
|
Posted:
Mon Jul 19, 2004 9:01 am |
|
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  |
|
|
|
 |
Raven

|
Posted:
Mon Jul 19, 2004 9:04 am |
|
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

|
Posted:
Mon Jul 19, 2004 9:38 am |
|
I've removed the error... but now I can't disable Debug mode...
The Debug text is still on my site although I set debug=0....
What can be wrong... |
|
|
|
 |
Raven

|
Posted:
Mon Jul 19, 2004 9:44 am |
|
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

|
Posted:
Mon Jul 19, 2004 11:00 am |
|
Thanks Raven... I don't know what I would do without you...
and all ppl here at ...
You are simply the Best...
I will add Your Banner on My Site to yours...
Thanks Again... You are Great...
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...  |
|
|
|
 |
|