I would apreciate if I would get some php expert help...

Status
Not open for further replies.

rol3y2104

New member
Feb 9, 2007
27
0
0
I'm trying to setup lerchmo's page generator +split tester. It does fine ..it generate's the page but on top of the page generated i get this two errors:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/learnmag/public_html/best-info/rotator/slimstat/rotator_stats.php on line 75

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/learnmag/public_html/best-info/rotator/slimstat/rotator_stats.php on line 89
Anybody any idea?
Thanks in advance for suggestions
Regards,
Robert
 


I haven't used the script but seems like your database isn't set up right.

Post the code for the lines you are getting the error rotator_stats.php on line 75 & 89.

It's trying to get info from a database that it can't see.
 
I haven't used the script but seems like your database isn't set up right.

Post the code for the lines you are getting the error rotator_stats.php on line 75 & 89.

It's trying to get info from a database that it can't see.
as far as i know the database it's setup correctly. All the permissions are setup the way it supposed to be.
$templates = array();
75: while($row = mysql_fetch_array($result,MYSQL_ASSOC))
{
if(!$templates[$row['template']])
$templates[$row['template']] = 1;
else
$templates[$row['template']]++;
}


$query = "SELECT * FROM `".SlimStat::my_esc($config->database )."`.`".SlimStat::my_esc( $config->clicks )."`";
$query.= " WHERE `from` = '$resource'";
$result = mysql_query($query);

$clicks = array();
89: while($row = mysql_fetch_array($result,MYSQL_ASSOC))

Lines 75 and 89 have the numbers in front of the code.
Thanks for your help,
Robert
 
Did you follow each step?

Step 1. Upload the entire "slimstat" directory to your server. The remainder of
these instructions assume that you have uploaded this to the root level,
i.e. that it is at http://www.example.com/slimstat/
Substitute your actual URL in all following examples.

Step 2. Load http://www.example.com/slimstat/ in the web browser of your choice.
Follow the instructions to complete installation.

Step 3. Include the inc.stats.php file in your PHP wherever you would like
stats to be counted. Use code similar to:
@include_once( $_SERVER["DOCUMENT_ROOT"]."/slimstat/inc.stats.php" );

Step 4. That's it. Load http://www.example.com/slimstat/ in your web browser.
 
Yeah it sounds like you're not connecting to your db correctly. So either the DB isn't setup right or your config stuff in your connection isn't right. One thing you might look at is if you have shared hosting sometimes you need to make you db something like hostusername_dbname, and hostusername_dbusername...
 
well ..i didnt actually ..just tried now but it gives me this bunch of errors when i'm going to SlimStat for Arbitrage
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/learnmag/public_html/best-info/slimstat/_functions.php on line 534

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/learnmag/public_html/best-info/slimstat/_functions.php on line 534

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/learnmag/public_html/best-info/slimstat/_functions.php on line 534

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/learnmag/public_html/best-info/slimstat/_functions.php on line 534

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/learnmag/public_html/best-info/slimstat/_functions.php on line 534

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/learnmag/public_html/best-info/slimstat/_functions.php on line 534

Warning: mysql_query() [function.mysql-query]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/learnmag/public_html/best-info/slimstat/_functions.php on line 343

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/learnmag/public_html/best-info/slimstat/_functions.php on line 343


I think it cant see the user and the db that i setup earlier !
Am I right?

 
Figured it out finally ...i should have played with the folder slimstat in the rotator directory...thanks for help guys now it runs great.
Rep+ to you when tomorow when i'll be able to spread some more..it seems i have spreaded to much in the last 24 hours.
Thanks again, you guys are fucking awesome!!
 
Status
Not open for further replies.