Jump to content

Recommended Posts

Hey,

 

My name is Luis and im from dominican republic , i code Html,Xhtml and css but im just starting to learn PHP so yeah :S well the problem is i installed a CMS but i get these error when i go to page all comes out but in top of all comes out these error:

 

 

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\config\properties.php on line 42

 

if you need to see the error by your self you can go on my CMS page hosted by me http://godly.zapto.org:8080.

 

ok After i read wat error sayd i tried to go to file and try to fix but nothing =[ could you guys help me fix these please!!? here is my File PHp content:

 

<?php 

/*¯¯¯¯|¯¯¯¯¯|¯¯¯¯¯¯¯¯|¯¯¯|¯¯¯||¯¯¯|¯¯¯|¯¯¯¯¯¯¯¯|¯¯¯¯¯¯|¯¯¯¯*\
|###########################################|
|#_____________________..ButsagsCMS.._____________________#|
|#______.Copyright ©2000-2009 Chris Ingis. All Rights Reserved._____#|
|###########################################|
\*____|_____|________|___|___||___|___|________|______|____*/


if(basename($_SERVER["PHP_SELF"]) == "properties.php"){
die("403 - Access Forbidden");
}

/* Site Controls */
$properties = mysql_query("SELECT * FROM butsags_properties");
$prop = mysql_fetch_array($properties);
$ipaddress = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];

if(isset($_SESSION['id'])){
	$getsty = mysql_query("SELECT * FROM accounts WHERE id=".$_SESSION['id']."");
	$showsty = mysql_fetch_array($getsty);

	if($showsty['style'] == NULL){
		$style = "1";
	}else{
		$style = $showsty['style'];
	}
	$getstyle = mysql_query("SELECT * FROM butsags_styles WHERE id=".$style."");
	$showstyle = mysql_fetch_array($getstyle);
}
	if(isset($_SESSION['id'])){
	$getcur = mysql_query("SELECT * FROM accounts WHERE id=".$_SESSION['id']."");
	$showcur = mysql_fetch_array($getcur);

	if($showcur['cursor'] == NULL){
		$cursor = "1";
	}else{
		$cursor = $showcur['cursor'];
	}
	$getcursor = mysql_query("SELECT * FROM butsags_cursors WHERE id=".$cursor."");
	$showcursor = mysql_fetch_array($getcursor);
}


/* Name of server */
$servername = $prop['name'];
/* Site title */
$sitetitle = $prop['title'];
$pb = " (Powered by GodlyMs!)";
/* Download link for client */
$client = $prop['client'];
/* Server Version */
$version = $prop['version'];
/* Forum url*/
$forumurl = $prop['forumurl'];
/* Site url */
$siteurl = $prop['siteurl'];
/* butsags Dir */
$butsagsdir = $prop['butsagsdir'];
                     /* Email */
$adminemail = $prop['email'];
/* Vote Link */
$vote = $prop['vote'];
/* Vote Enabled */
$vcheck = $prop['vcheck'];
/* Vote Banner Link */
$vbanner = $prop['vbanner'];
/* Server Rates */
$exprate = $prop['exprate'];
$mesorate = $prop['mesorate'];
$droprate = $prop['droprate'];
/* Middle Banner Link */
$mbanner = $prop['mbanner'];
/* Middle Link */
$mblink = $prop['mblink'];
/* Menu Message */
$message = $prop['message'];
/* Flood Prevention */
$butsagsflood = $prop['flood'];
/* Flood Interval */
$butsagsfloodint = $prop['floodint'];
/* Scrolling Message */
$scroller = $prop['scroller'];
/* Level for GMs and up */
$gmlevel = $prop['gmlevel'];
/* Player Cap */
$pcap = $prop['pcap'];
/* Accounts Per IP */
$MaxAcc = $prop['maxaccounts'];
/* Public Key For Recaptcha*/
$pubkey = $prop['pubkey'];
/* Private Key For Recaptcha*/
$privkey = $prop['privkey'];
/*Chatbox HTML*/
$chatbox = $prop['chatbox'];
/* Where is the style located? */
if(isset($_SESSION['id'])){
	$styledir = $showstyle['dir'];
}else{
	$styledir = $prop['styledir'];
}
if(isset($_SESSION['id'])){
	$cursordir = $showcursor['dir'];
}else{
	$cursordir = $prop['cursordir'];
}

?>

 

if you guys can help me i would i apreciate it very much!! thank you  :shy:

Link to comment
https://forums.phpfreaks.com/topic/182333-guys-i-need-help-please/
Share on other sites

On SELECT statements the only reason mysql_query would return FALSE is if you didn't have permission on the table

mysql_query() will also fail and return FALSE  if the user does not have permission to access the table(s) referenced by the query.

 

EDIT: not having permission on a table can also be the same as a table not existing at all. (This may mean you have mispelled a tablename)

 

This is why you should use the mysql debugging function provided to you to catch such things.

 

Example

      $getcursor = mysql_query("SELECT * FROM butsags_cursors WHERE id=".$cursor."") or die(mysql_error()); //       $showcursor = mysql_fetch_array($getcursor);

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.