Jump to content

Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in


nicocampa

Recommended Posts

Hi,

 

I'm trying to install this http://www.bramstart.be/ibwds/?script=news1.1

Even if i use Mamp (mac) or my website (both with CORRECT config information), the system brings me to a page "install.php?install=1" but nothing happen.

Any guess on this?

 

So i found in one of my old website where i had the same script. I duplicate the db tables and i duplicate all the files in my new ftp, just after having that updated with the new sql details.

when i try to login i have this error message:

 

 

 

Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in /web/htdocs/www.xxxx.net/xxxx/xxxx/xxxx/xxxx/admin/admin.php on line 13

 

The text around is 

 

-------

 

 

<?
 
/*###############################################################*\
##                       iBWd News 1.1b                          ##
##                 http://bramstart.be/ibwds                     ##
##                                                               ##
*/###############################################################*\
 
 
require("config.php");
$query = "SELECT * FROM $table_users";
$result = mysql_query($query);
list($col1) = mysql_fetch_row($result);
if($col1==""){ $adm = 1; }
unset($query);
unset($result);
if($adm != "1"){
require("access.php");
if($status == "MOD"){ exit; }
}

-----------------

 

 

any ideas?

 

thanks!!!

 

Link to comment
Share on other sites

but nothing happen

 

 

something DID happen, even if you get a blank page, that's a symptom that helps pin down the problem.

 

the error message is because the query failed due to an error. there's 5-10 possible reasons, but if you echo mysql_error(); on the next line after the mysql_query() statement it will tell you why the query failed.

Link to comment
Share on other sites

something DID happen, even if you get a blank page, that's a symptom that helps pin down the problem.

 

I mean that i get a page (install.php) which i can see a "Install now" link. If i click it the page turn into a install.php?install=1 but nothing change from the previous screen and the db seems empty as before.

 

 

I know its old. I looked for others but this was the only one fitting with my need. Im gonna look better for another choice!

thanks for the help!

Link to comment
Share on other sites

the reason why the install page doesn't change is because the code (all of it) needs to be rewritten to work under the latest php version. none of the external post/get/cookie variables are working, so all the code dependent on them must be updated to use the correct $_POST or $_GET variables.

 

also, all the session code won't work and any reference to the session functions and relevant variables must be rewritten.

Link to comment
Share on other sites

I really think, as is suggested by mac_guyver, that this script will be more trouble than it is worth. Not only would it need completely rewriting initially but as time goes on you will find more problems and a lack of flexibility.

 

If you have access to a MySQL database, there are plenty of tutorials around about setting up basic news scripts.

 

However, if this is not an option, before I moved across to MySQL, I used CuteNews, which is very good at what it does (but I soon outgrew it's limitations).

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.