View previous topic :: View next topic |
Author |
Message |
prolific
Joined: 28 Sep 2004 Posts: 29
|
Posted: Thu Nov 11, 2004 2:08 pm Post subject: ERROR |
|
|
I woke up this morning to find this error on my site. All my hostees have this error but on a different line. I don't understand what could be wrong with it. I tried restoring back ups and that didn't work and I also tried to restore the index.php file and that didn't work either. I also tried looking on here and found a post similar to mine, but that didn't help.
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/addickt/public_html/b2/index.php on line 54 |
|
Back to top |
|
 |
prolific
Joined: 28 Sep 2004 Posts: 29
|
Posted: Thu Nov 11, 2004 2:09 pm Post subject: |
|
|
This is my index.php code.
<?php /* Don't remove this line, it calls the b2 function files ! */ $blog=1; include ("blog.header.php"); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<!-- layout credits goto http://bluerobot.com/web/layouts/layout2.html -->
<LINK REL=stylesheet HREF="http://addickt3d.net/b2/style.css" TYPE="text/css">
<style type="text/css">
html {
scrollbar-track-color: #694501;
scrollbar-face-color: #694501;
scrollbar-highlight-color: #FFFFFF;
scrollbar-3dlight-color: #694501;
scrollbar-darkshadow-color: #694501;
scrollbar-shadow-color: #FFFFFF;
scrollbar-arrow-color: #986601;
}
<!--
A:link {color:#694501};}
A:visited {color:#694501;}
A:active {color:#694501;}
}
-->
<!-- body{background color:#AA9966}
//--></style>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="reply-to" content="<?php bloginfo('admin_email'); ?>" />
<meta http-equiv="imagetoolbar" content="no" />
<meta content="TRUE" name="MSSmartTagsPreventParsing" />
<style type="text/css" media="screen">
@import url( style.css );
</style>
<link rel="stylesheet" type="text/css" media="print" href="print.css" />
<link rel="alternate" type="application/rdf+xml" title="RDF" href="<?php bloginfo('rdf_url'); ?>" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php comments_popup_script() ?>
</head>
<body style="background: transparent">
<body>
<div id="content">
<!-- // b2 loop start -->
<?php while($row = mysql_fetch_object($result)) { start_b2(); ?>
<br>
<br>
<?php the_date("","<h2>","</h2>"); ?>
<?php permalink_anchor(); ?>
<br>
<div class="storyTitle"><?php the_title(); ?>
</div>
<br>
<div class="storyContent">
<?php the_content(); ?>
<br>
<br>
<span class="storyAuthor"><?php the_author() ?> - @ <?php the_time() ?></a>
<br>
<div class="rightFlush">
<?php link_pages("<br />Pages: ","<br />","number") ?>
<?php comments_popup_link("get hooked? (0)", " fiends(1)", " can't get enough(%)") ?>
<?php trackback_rdf() ?>
<!-- this includes the comments and a form to add a new comment -->
<?php include ("b2comments.php"); ?>
</div>
</div>
<!-- // this is just the end of the motor - don't touch that line either -->
<?php } ?>
</div>
<div align="right">[powered by <a href="http://cafelog.com" target="_blank"><b>b2</b></a>.]<br />
</body>
</html> |
|
Back to top |
|
 |
Sigg3
Joined: 03 Jul 2003 Posts: 898 Location: Oslo, Norway
|
|
Back to top |
|
 |
prolific
Joined: 28 Sep 2004 Posts: 29
|
Posted: Thu Nov 11, 2004 2:30 pm Post subject: |
|
|
Sigg3 wrote: | Might have to do with your double body:
<body style="background: transparent">
<body>
...not sure, tho. Seems like a db issue. |
I'll try it thanks
I checked my dbs this morning and all of them said that the table had not been closed properly so I ran the repair option and they seemed to be working alright. I emailed my host and she has yet to get back at me. So I'm hoping for a response this morning. |
|
Back to top |
|
 |
prolific
Joined: 28 Sep 2004 Posts: 29
|
Posted: Thu Nov 11, 2004 2:45 pm Post subject: |
|
|
I removed the body code but that still didn't help, but thanks for the suggestion. |
|
Back to top |
|
 |
Sigg3
Joined: 03 Jul 2003 Posts: 898 Location: Oslo, Norway
|
|
Back to top |
|
 |
sh0ck
Joined: 02 May 2004 Posts: 50 Location: Norway
|
Posted: Fri Nov 12, 2004 2:14 pm Post subject: |
|
|
is blog.header.php in the same folder as index.php? This has nothing to do with HTML code, but PHP (prolly the b2 engine). _________________ http://www.licklinux.com |
|
Back to top |
|
 |
stevem
Joined: 15 Mar 2003 Posts: 365
|
Posted: Fri Nov 12, 2004 4:21 pm Post subject: |
|
|
Given that nothing else has changed I would look at the databases as the warning tells you PHP is not getting any information from them. Have they got corrupted - use phpMyAdmin to look at them and it should tell you if there any errors. If it's a corrupted form then use Code: | REPAIR TABLE name_of_table_here USE_FRM | see for example http://dev.mysql.com/doc/mysql/en/REPAIR_TABLE.html and http://dev.mysql.com/doc/mysql/en/Repair.html
If that doesn't do it, check if the mySql passwords been changed. |
|
Back to top |
|
 |
prolific
Joined: 28 Sep 2004 Posts: 29
|
Posted: Mon Nov 15, 2004 8:26 pm Post subject: |
|
|
Thanks to everyone that replied.
stevem's solution did help me.  |
|
Back to top |
|
 |
quiet-storm
Joined: 09 Aug 2004 Posts: 10
|
Posted: Mon Nov 22, 2004 10:22 pm Post subject: |
|
|
i'm getting the same type error:
Quote: | Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/quietst/public_html/index.php on line 124 |
when i went to see if the database was corrupted, it said everything was ok. i clicked repair anyway, but nothing changed.
i have another b2 blog installed on the same database but it's working fine, so i think it's a problem with the tables, i just don't know how to fix it. |
|
Back to top |
|
 |
Sigg3
Joined: 03 Jul 2003 Posts: 898 Location: Oslo, Norway
|
|
Back to top |
|
 |
quiet-storm
Joined: 09 Aug 2004 Posts: 10
|
Posted: Tue Nov 23, 2004 5:14 pm Post subject: |
|
|
yes i do. i've had 2 running on 1 database for at least a month now with no problem. |
|
Back to top |
|
 |
|