LucidCMS Error

Results 1 to 8 of 8
  1. #1
    Proficient Member Prestige is offline
    MemberRank
    Nov 2012 Join Date
    BritshitLocation
    158Posts

    shout LucidCMS Error

    Hi everyone,

    So i'm trying to use the LucidMS CMS to redesign it etc.. however im getting an error on the index page.

    The error says:

    PHP Code:
    Warningmysql_num_rows() expects parameter 1 to be resourceboolean given in C:\wamp\www\includes\nav.php on line 3 
    And an image of the full error:


    And my code for where the error happening is

    Code:
    <?php
    $countonline = mysql_query("SELECT * FROM accounts where loggedin = 2");
    $plyonline 	= mysql_num_rows($countonline);
    $url = $_SERVER['REQUEST_URI'];
    
    ?>
    
    <div class="container">
    	<div class="sixteen columns">
    		<div id="logo"></div>
    
    		<nav>
    			<ul>
    				<li <?php if ($url == '/?p=home' or $url == '/?p=index' or $url == '/') { ?>class="nhome" <?php } ?>><a href="?p=index">Home</a></li>
    				<li <?php if ($url == '/?p=signup') { ?>class="nhome" <?php } ?>><a href="?p=signup">Sign Up</a></li>
    				<li <?php if ($url == '/?p=download') { ?>class="nhome" <?php } ?>><a href="?p=download">Download</a></li>
    				<li <?php if ($url == '/?p=vote') { ?>class="nhome" <?php } ?>><a href="?p=vote">Vote</a></li>
    				<li <?php if ($url == '/?p=donate') { ?>class="nhome" <?php } ?>><a href="?p=donate">Donate</a></li>
    				<li <?php if ($url == '/?p=chat') { ?>class="nhome" <?php } ?>><a href="?p=chat">Chat</a></li>
    				<li><a href="<?php echo $forum; ?>" target="_blank">Community</a></li>
    			</ul>
    		</nav>
    		<div id="scroller_box">
    			<div id="scroller_inside">
    				<marquee scrollamount="10">Welcome to <?php echo $servername; ?>! <strong>Our rates are <?php echo $exprate; ?>x/<?php echo $mesorate; ?>x/<?php echo $droprate; ?>x.</strong> Have fun playing and don’t forget to vote every 6 hours!</marquee>
    			</div>
    		</div>
    	</div><!-- Three Columns =================================== -->
    
    <!-- first -->
    
    <div class="one-third column">
    		<div class="top_contents">
    			<div class="c_spacing">
    				<div class="left">
    					<?php if ($plyonline > 0) { ?>
    						<img src="images/tools/online.png"></div>
    					<?php } else { ?>
    						<img src="images/tools/offline.png"></div>
    					<?php } ?>
    				<div class="top_right">
    					<?php if ($plyonline > 0) { ?>
    						<h5><?php echo $servername; ?> is <span class="green">Online</span><br /><span class="green"><?php echo $plyonline; ?></span> players logged in.</h5>
    						<p>
    							Channel Server . .   <span class="green lowercase">Online</span><br />
    							Login Server . .  <span class="green lowercase">Online</span><br />
    							World Server . .  <span class="green lowercase">Online</span>
    						</p>
    					<?php } else { ?>
    						<h5><?php echo $servername; ?> is <span class="red">Offline</span><br /><span class="red"><?php echo $plyonline; ?></span> players logged in.</h5>
    						<p>
    							Channel Server . . .  <span class="red lowercase">Offline</span><br />
    							Login Server . . . <span class="red lowercase">Offline</span><br />
    							World Server . . . <span class="red lowercase">Offline</span>
    						</p>
    					<?php } ?>
    				</div>
    			</div>
    		</div>
    	</div>
    Any help would be greatly appreciated as i cannot simply fix it. D:

    Thanks
    -Xrin


  2. #2
    Beep Boop Rampenbram is offline
    MemberRank
    Feb 2009 Join Date
    The NetherlandsLocation
    341Posts

    Re: LucidCMS Error

    line 3 is : $plyonline = mysql_num_rows($countonline); it's connected with line 2 $countonline = mysql_query("SELECT * FROM accounts where loggedin = 2"); which selects something from your database, so check if your database is connected and make sure you have the sql file executed

  3. #3
    Proficient Member Prestige is offline
    MemberRank
    Nov 2012 Join Date
    BritshitLocation
    158Posts

    Re: LucidCMS Error

    Quote Originally Posted by Rampenbram View Post
    line 3 is : $plyonline = mysql_num_rows($countonline); it's connected with line 2 $countonline = mysql_query("SELECT * FROM accounts where loggedin = 2"); which selects something from your database, so check if your database is connected and make sure you have the sql file executed
    Yeah..so it's selecting the accounts table and if the "loggedin" column is = 2. it will display one player online, correct? And currently my database does have that column and same table name.
    I believe my database is connected to the cms because. I've changed the IP, database, root name and pw. which are usually the only things required to change to load up the site xD

    However..about the SQL.. i haven't executed any for the CMS? Nor do i think there was any provided, so if i was to create my own SQL.. what will the sql need to execute?

    Thanks btw :3

  4. #4
    Beep Boop Rampenbram is offline
    MemberRank
    Feb 2009 Join Date
    The NetherlandsLocation
    341Posts

    Re: LucidCMS Error

    I think it had a sql

  5. #5
    Proficient Member Prestige is offline
    MemberRank
    Nov 2012 Join Date
    BritshitLocation
    158Posts

    Re: LucidCMS Error

    Quote Originally Posted by Rampenbram View Post
    I think it had a sql
    Hmm, i didn't get one with the files. Could you perhaps provide one? Or not.

    Edit: Sooo i've noticed after running a error query. The problem seems to be no database is selected..however my config is correctly modified..?
    Last edited by Prestige; 21-10-14 at 11:00 PM.

  6. #6
    Member buttocks is offline
    MemberRank
    Mar 2014 Join Date
    91Posts

    Re: LucidCMS Error

    I've used that cms before, it doesn't have a function to connect to the database in config.php, so either add it or rip it off a diff cms.

  7. #7
    Member tenkirokun is offline
    MemberRank
    Jul 2008 Join Date
    79Posts

    Re: LucidCMS Error

    apply error_reporting(0); to the top of your config.php :) if you have any further issues pm me.

  8. #8
    the one and only Skorch is offline
    MemberRank
    Jun 2012 Join Date
    skorchLocation
    354Posts

    Re: LucidCMS Error

    hi jake



Advertisement