|
||||
|
|
OOTP Mods - Database Tools Do you need to take a dump? SQL gurus welcome |
|
Thread Tools |
05-23-2017, 07:53 PM | #1 |
Major Leagues
Join Date: Jul 2002
Location: Albany, NY
Posts: 346
|
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. |
05-24-2017, 04:28 PM | #2 |
Hall Of Famer
Join Date: Nov 2002
Posts: 3,585
|
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.
__________________
StatsLab- PHP/MySQL based utilities for Online Leagues Baseball Cards - Full list of known templates and documentation on card development. |
05-26-2017, 02:15 AM | #3 |
Major Leagues
Join Date: Jul 2002
Location: Albany, NY
Posts: 346
|
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.
|
05-26-2017, 02:35 AM | #4 |
Hall Of Famer
Join Date: Nov 2002
Posts: 3,585
|
I'd be happy to take a look personally if needed. Just shoot me a PM.
__________________
StatsLab- PHP/MySQL based utilities for Online Leagues Baseball Cards - Full list of known templates and documentation on card development. |
06-02-2017, 10:52 PM | #5 |
Major Leagues
Join Date: Jul 2002
Location: Albany, NY
Posts: 346
|
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 |
Bookmarks |
|
|