OOTP Developments Forums

OOTP Developments Forums (https://forums.ootpdevelopments.com//index.php)
-   OOTP Mods - Database Tools (https://forums.ootpdevelopments.com//forumdisplay.php?f=3633)
-   -   Statslab for OOTP 18 SQL Error (https://forums.ootpdevelopments.com//showthread.php?t=278634)

almo 05-23-2017 07:53 PM

Statslab for OOTP 18 SQL Error
 
I have been running an online league since OOTP 12 and have had Statslab set up for all of the iterations up to OOTP 16. We skipped version 17 and are in the process of updating to 18. I tried to update the "dbopen.php" file. which appears slightly different in context vs the previous versions of the file. Example:

Old verison I updated with 12-16

<?php
$db = mysql_connect('localhost','fanatic_stats13','yfs~I eUZVJ8%') or die('Could not connect: '.mysql_error());
mysql_select_db('fanatic_StatsLab13');
?>

Dont worry I changed the password so that its diff

New Version with 18:

<?php
$sqlhost = 'sqlhost.domain.com';
$sqluser = 'sqluser';
$sqlpass = 'sqlpassword';
$sqldb = 'sqldb';

##### DO NOT EDIT BELOW THIS LINE #####
$db = mysql_connect($sqlhost,$sqluser,$sqlpass) or die('Could not connect: '.mysql_error());
mysql_select_db($sqldb);

?>

So my question is this....The first line 'sqlhost.domain.com'....is that not
'localhost' anymore? Ive tried:

'localhost'
'localhost.fanaticbaseball.com'

In either of those cases...I get the following errors.



Warning: mysqli_query() expects parameter 1 to be mysqli, resource given in /home/fanatic/public_html/StatsLab/StatsLab/session_functions.php on line 117

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in /home/fanatic/public_html/StatsLab/StatsLab/session_functions.php on line 118

Warning: mysqli_close() expects parameter 1 to be mysqli, resource given in /home/fanatic/public_html/StatsLab/StatsLab/session_functions.php on line 129

Warning: mysqli_query() expects parameter 1 to be mysqli, resource given in /home/fanatic/public_html/StatsLab/StatsLab/session_functions.php on line 149

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in /home/fanatic/public_html/StatsLab/StatsLab/session_functions.php on line 150

Warning: mysqli_close() expects parameter 1 to be mysqli, resource given in /home/fanatic/public_html/StatsLab/StatsLab/session_functions.php on line 318

Warning: Cannot modify header information - headers already sent by (output started at /home/fanatic/public_html/StatsLab/StatsLab/session_functions.php:74) in /home/fanatic/public_html/StatsLab/StatsLab/session_functions.php on line 341

Warning: mysqli_query() expects parameter 1 to be mysqli, resource given in /home/fanatic/public_html/StatsLab/StatsLab/nav_functions.php on line 838

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in /home/fanatic/public_html/StatsLab/StatsLab/nav_functions.php on line 839

Warning: mysqli_close() expects parameter 1 to be mysqli, resource given in /home/fanatic/public_html/StatsLab/StatsLab/nav_functions.php on line 857

Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli, resource given in /home/fanatic/public_html/StatsLab/StatsLab/session_functions.php on line 224

Warning: mysqli_query() expects parameter 1 to be mysqli, resource given in /home/fanatic/public_html/StatsLab/StatsLab/session_functions.php on line 228

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in /home/fanatic/public_html/StatsLab/StatsLab/session_functions.php on line 229

Warning: mysqli_close() expects parameter 1 to be mysqli, resource given in /home/fanatic/public_html/StatsLab/StatsLab/session_functions.php on line 318

Warning: Cannot modify header information - headers already sent by (output started at /home/fanatic/public_html/StatsLab/StatsLab/session_functions.php:74) in /home/fanatic/public_html/StatsLab/StatsLab/session_functions.php on line 341

ERROR: OOTP SQL Utilities not configured properly (no ootp_sql_admin table)

Warning: mysqli_query() expects parameter 1 to be mysqli, resource given in /home/fanatic/public_html/StatsLab/StatsLab/html_functions.php on line 100

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in /home/fanatic/public_html/StatsLab/StatsLab/html_functions.php on line 101
05-23-2017

BNN Index Scores Standings Stats Teams Players Transactions History


StatsLab Login

Warning: mysqli_close() expects parameter 1 to be mysqli, resource given in /home/fanatic/public_html/StatsLab/StatsLab/html_functions.php on line 188

Warning: mysqli_query() expects parameter 1 to be mysqli, resource given in /home/fanatic/public_html/StatsLab/StatsLab/nav_functions.php on line 370

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in /home/fanatic/public_html/StatsLab/StatsLab/nav_functions.php on line 371

Warning: mysqli_close() expects parameter 1 to be mysqli, resource given in /home/fanatic/public_html/StatsLab/StatsLab/nav_functions.php on line 380

Warning: mysqli_query() expects parameter 1 to be mysqli, resource given in /home/fanatic/public_html/StatsLab/StatsLab/nav_functions.php on line 678

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in /home/fanatic/public_html/StatsLab/StatsLab/nav_functions.php on line 679

Warning: mysqli_close() expects parameter 1 to be mysqli, resource given in /home/fanatic/public_html/StatsLab/StatsLab/nav_functions.php on line 712


Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in /home/fanatic/public_html/StatsLab/StatsLab/nav_functions.php on line 765


Warning: mysqli_close() expects parameter 1 to be mysqli, resource given in /home/fanatic/public_html/StatsLab/StatsLab/login.php on line 211

StatsLab SQL Utilities for OOTP18 v.3.18.01
Tuesday, May 23rd, 2017

Anytips will help. I mean I can always try an recreate the SQL database.

fhomess 05-24-2017 04:28 PM

You will need to update dbopen.php with the OOTP18 version. If you notice, the dbopen.php you posted is using mysql_connect. The new version should have mysqli_connect in it.

almo 05-26-2017 02:15 AM

I did change the dbopen file...same situation with the same errors. not sure what else to do. Ill try to reinstall from scratch i guess.

fhomess 05-26-2017 02:35 AM

Quote:

Originally Posted by almo (Post 4200274)
I did change the dbopen file...same situation with the same errors. not sure what else to do. Ill try to reinstall from scratch i guess.

I'd be happy to take a look personally if needed. Just shoot me a PM.

almo 06-02-2017 10:52 PM

I really have to thank fhomess for his help. He is second to none and a class act!! I cant say enough good things about him and look up to him as a resource.

Thanks again man!

Chris
FBL - Fanatic Baseball League


All times are GMT -4. The time now is 10:08 AM.

Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright © 2020 Out of the Park Developments