Home | Webstore
Latest News: OOTP 26 Available - FHM 11 Available - OOTP Go! Available

Out of the Park Baseball 26 Buy Now!

  

Go Back   OOTP Developments Forums > Prior Versions of Our Games > Earlier versions of Out of the Park Baseball > Earlier versions of OOTP: Mods

 
 
Thread Tools
Old 05-19-2005, 12:27 AM   #1
Hoeksam
Minors (Double A)
 
Hoeksam's Avatar
 
Join Date: Oct 2003
Location: Ravena, NY
Posts: 160
BOSI v1 issue - player pages

I'm running BOSI v1 on my server and when I go to click on a player to bring up their player page, I get the following message:

Quote:
Warning: extract(): First argument should be an array in /hsphere/local/home/cnote2/fantasysports.chrisfurman.com/wpl/BOSI/player_page.php on line 49
The argument it is talking about is the get player information query/array in the player_page.php file. Here is a snipet of the code where the error is showing (this is after the query is run):

PHP Code:
$sql_get_player mysql_query($sql_get_player_txt,$dbi);
if (!
$sql_get_player)
  die(
"Error retreiving player info.  Please report the following query -- $sql_get_player_txt");
$p_array mysql_fetch_array($sql_get_player);
extract($p_array); 
I'm sure about 95% of everyone's moved onto BOSI v2, but if anyone can help me out with this, it'd be greatly appreciated.

Thanks.
~ Chris
WPL Commish
http://fantasysports.chrisfurman.com/wpl
__________________
The tower of power, too sweet to be sour...

Elite Baseball League - Milwaukee Brewers

Right this way, everyone. Free puppies, ginger snaps, pocket PC's...
Hoeksam is offline  
Old 05-19-2005, 02:14 AM   #2
DaveHorn
All Star Starter
 
DaveHorn's Avatar
 
Join Date: Aug 2003
Posts: 1,146
It sounds like you are running in php 5? Of the top of my head I can't remember the exact details but there was a change in the warnings when dealing with arrays. There is an option that I also can't remember that can supress that warning and you'll probaby be fine. Worse case, a slight code change can fix the problem.

Confirm you PHP version and I could help you with more details.

If you don't know, build a php with the following

Code:
<?php
phpinfo();?>
Call it whatever.php and execute it on your server. It will report much info about your php system.
__________________
Dave
HFTC Commish
DaveHorn is offline  
Old 05-19-2005, 04:47 AM   #3
canadiancreed
Hall Of Famer
 
Join Date: Aug 2004
Posts: 11,660
isnt it in php.ini somewere where you can turn on and off various warning levels?
__________________
PT21



PT22

canadiancreed is offline  
Old 05-19-2005, 09:12 AM   #4
Hoeksam
Minors (Double A)
 
Hoeksam's Avatar
 
Join Date: Oct 2003
Location: Ravena, NY
Posts: 160
I'm running in PHP version 4.3.10 (there wasn't anything written in your code box, Dave, so I created just a basic page calling 'phpinfo()' on it. I know a little bit about PHP/SQL...)

And I'm not sure I can edit the php.ini file since the file is in a separate file my hosting company (WebSiteSource -- http://www.websitesource.com) doesn't allow me access to.
__________________
The tower of power, too sweet to be sour...

Elite Baseball League - Milwaukee Brewers

Right this way, everyone. Free puppies, ginger snaps, pocket PC's...
Hoeksam is offline  
Old 05-19-2005, 09:20 AM   #5
canadiancreed
Hall Of Famer
 
Join Date: Aug 2004
Posts: 11,660
taht sucks ass. as for that error that's weird. it sounds like its' expectign an array but not getting one?
__________________
PT21



PT22

canadiancreed is offline  
Old 05-19-2005, 09:34 AM   #6
Hoeksam
Minors (Double A)
 
Hoeksam's Avatar
 
Join Date: Oct 2003
Location: Ravena, NY
Posts: 160
Yeah and, as far as my limited php knowledge can tell me, it looks like everything is being called right for that array to appear.

And, sadly, this is the second error I'm getting with the page. The first error I was getting was:

Quote:
Warning: extract(): First argument should be an array in /hsphere/local/home/cnote2/fantasysports.chrisfurman.com/wpl/BOSI/player_page.php on line 49
Error getting league info. Please report the following info -- select IMAGE_DIR,PLAYER_IMAGE_DIR,Ratings,IMAGE_TYPE,Mont h,Day,Year,NO_ARBY,award1,award2 from LEAGUE where LEAGUE_ID =
So I went into the page and looked for where it was calling the league ID and changed it from $LEAGUE_ID to $lid. Once I did this, I actually got the page to start filling in some information, but got that other error (about the array).

Thanks for everyone's help so far. If I can get it to work at some point on my own, I'll keep you posted.
__________________
The tower of power, too sweet to be sour...

Elite Baseball League - Milwaukee Brewers

Right this way, everyone. Free puppies, ginger snaps, pocket PC's...
Hoeksam is offline  
Old 05-19-2005, 09:35 AM   #7
canadiancreed
Hall Of Famer
 
Join Date: Aug 2004
Posts: 11,660
wonder if you can print the data to see waht its' calling and why it's not liking it?
__________________
PT21



PT22

canadiancreed is offline  
Old 05-19-2005, 09:37 AM   #8
Hoeksam
Minors (Double A)
 
Hoeksam's Avatar
 
Join Date: Oct 2003
Location: Ravena, NY
Posts: 160
FYI, if people want to go in and see what I'm talking about, I've created a test user. The test user is assigned to the Rikers Island Capones:

username: bositest
password: bositest
__________________
The tower of power, too sweet to be sour...

Elite Baseball League - Milwaukee Brewers

Right this way, everyone. Free puppies, ginger snaps, pocket PC's...
Hoeksam is offline  
Old 05-19-2005, 09:42 AM   #9
Hoeksam
Minors (Double A)
 
Hoeksam's Avatar
 
Join Date: Oct 2003
Location: Ravena, NY
Posts: 160
Quote:
Originally Posted by canadiancreed
wonder if you can print the data to see waht its' calling and why it's not liking it?
I noticed that, when looking at the SQL it's trying to call that only a few of the columns are directly related to the table they come from

For example: if I'm trying to get the column LNAME from the PLAYER table, it's written as:

LNAME

instead of

PLAYER.LNAME (or p.LNAME, if I've assigned the abbreviation 'p' to the table PLAYER)

Some of the columns are written like this, but not all of them. Doubt if the problem is being caused by that, but, to me anyways, it'd just make for tidier coding.
__________________
The tower of power, too sweet to be sour...

Elite Baseball League - Milwaukee Brewers

Right this way, everyone. Free puppies, ginger snaps, pocket PC's...
Hoeksam is offline  
Old 05-19-2005, 10:47 AM   #10
DaveHorn
All Star Starter
 
DaveHorn's Avatar
 
Join Date: Aug 2003
Posts: 1,146
I hope you saved any code you changed. You can certainly make modifications to make a fix, but assuming you got current BOSI v1 code changes like this are not necessary in a typical system.

You don't always need access to the php.ini to make configuration changes, you can do it in the code.

Sorry for my gaff on the missing code. It should of been.

Code:
?php
phpinfo();
?
My code doesn't include the starting < and ending > for some reason that is causing the code block to be blank.


Doesn't sound like that is your problem though, you other error leads me to believe that you've got a red herring.

Now that I look at your website I think I may know what the problem is. Looks like you put BOSI in a frame and you are losing your URL parameters. All the BOSI pages need to carry around a paramater on the URL lid=x where x is the ID of your league.

When I go to your standings page it is within a frame and no longer contains the league id aka lid. I think that the lid may be getting lost somehow with the frames you built around BOSI.
__________________
Dave
HFTC Commish
DaveHorn is offline  
Old 05-19-2005, 10:48 AM   #11
DaveHorn
All Star Starter
 
DaveHorn's Avatar
 
Join Date: Aug 2003
Posts: 1,146
Quote:
Originally Posted by Hoeksam
Some of the columns are written like this, but not all of them. Doubt if the problem is being caused by that, but, to me anyways, it'd just make for tidier coding.
Its not. You only need to include the table name if the column reference is ambiguous.
__________________
Dave
HFTC Commish
DaveHorn is offline  
Old 05-19-2005, 10:59 AM   #12
DaveHorn
All Star Starter
 
DaveHorn's Avatar
 
Join Date: Aug 2003
Posts: 1,146
If by chance you still need to suppress the warnings you can do it with a call like this.

Code:
ini_set('error_reporting', E_ERROR);
or

Code:
error_reporting(E_ERROR);
You could put this code in the bosi_config.php file or something to make the change for all your BOSI code at once.

However, I don't think this is necessary or will fix the problem. The BOSI 1 code out of the box doesn't have this problem and I think its because of your frames or something else you may have modified.
__________________
Dave
HFTC Commish
DaveHorn is offline  
Old 05-19-2005, 11:05 AM   #13
Hoeksam
Minors (Double A)
 
Hoeksam's Avatar
 
Join Date: Oct 2003
Location: Ravena, NY
Posts: 160
Yeah, I created backups of all the pages I changed along with commenting in the current pages where I made changes and what changes I made, so it's easy to get back to the original pages.

Gotcha about the frames. I didn't catch onto that becuse I'd see the pid come over in the URL and figured the lid was coming along as well, but behind the scenes. Makes sense, though.

As for the frame, could I just go in and edit the menu_main.php file and add that menubar frame to the javascript bar as an additional drop-down list so I can get rid of that frame, but get all of the links from it into the javascript bar in BOSI?

Thanks for all of your help.
__________________
The tower of power, too sweet to be sour...

Elite Baseball League - Milwaukee Brewers

Right this way, everyone. Free puppies, ginger snaps, pocket PC's...
Hoeksam is offline  
Old 05-19-2005, 11:07 AM   #14
Hoeksam
Minors (Double A)
 
Hoeksam's Avatar
 
Join Date: Oct 2003
Location: Ravena, NY
Posts: 160
I'm assuming it's because of the frames. The only modification I've made to any of the BOSI code was to that one page where I made that switch for $LEAGUE_ID.

I'll try removing the frames and see where that gets me.

Thanks again.
__________________
The tower of power, too sweet to be sour...

Elite Baseball League - Milwaukee Brewers

Right this way, everyone. Free puppies, ginger snaps, pocket PC's...
Hoeksam is offline  
Old 05-19-2005, 11:16 AM   #15
DaveHorn
All Star Starter
 
DaveHorn's Avatar
 
Join Date: Aug 2003
Posts: 1,146
Quote:
Originally Posted by Hoeksam
As for the frame, could I just go in and edit the menu_main.php file and add that menubar frame to the javascript bar as an additional drop-down list so I can get rid of that frame, but get all of the links from it into the javascript bar in BOSI?
Yeah you can edit that menu to your hearts content. If you check out my league and BOSI, you'll see many many modifications to the menu among other things.

http://www.hitforthecycle.com/bosi/standings.php?lid=3
__________________
Dave
HFTC Commish
DaveHorn is offline  
Old 05-19-2005, 11:27 AM   #16
Hoeksam
Minors (Double A)
 
Hoeksam's Avatar
 
Join Date: Oct 2003
Location: Ravena, NY
Posts: 160
Update: I backed out all the code changes I made (all 2 of them), and took BOSI out of the frame, and I'm still getting the following error:
Quote:
Warning: extract(): First argument should be an array in /hsphere/local/home/cnote2/fantasysports.chrisfurman.com/wpl/BOSI/player_page.php on line 49
Error getting league info. Please report the following info -- select IMAGE_DIR,PLAYER_IMAGE_DIR,Ratings,IMAGE_TYPE,Mont h,Day,Year,NO_ARBY,award1,award2 from LEAGUE where LEAGUE_ID =
I checked the table in MySQL to make sure it was populated (didn't think it wouldn't be... just double-checking) and it appeared to be populated ok.

I'm not sure if I'm getting the error because I did something wrong when importing everything (never had an error, though) or if there's something else I'm missing. I didn't put in the error_reporting code you gave me but, as you said, I'm not sure that would help.

*puzzled*
__________________
The tower of power, too sweet to be sour...

Elite Baseball League - Milwaukee Brewers

Right this way, everyone. Free puppies, ginger snaps, pocket PC's...
Hoeksam is offline  
Old 05-19-2005, 11:35 AM   #17
Hoeksam
Minors (Double A)
 
Hoeksam's Avatar
 
Join Date: Oct 2003
Location: Ravena, NY
Posts: 160
Sorry, forgot to post a link for the non-framed version of the page:

http://fantasysports.chrisfurman.com/wpl/main.php
__________________
The tower of power, too sweet to be sour...

Elite Baseball League - Milwaukee Brewers

Right this way, everyone. Free puppies, ginger snaps, pocket PC's...
Hoeksam is offline  
Old 05-19-2005, 04:15 PM   #18
DaveHorn
All Star Starter
 
DaveHorn's Avatar
 
Join Date: Aug 2003
Posts: 1,146
Ok, there is some inconsistency with the coding on this page that you have already discovered. That query is trying to use the league id that it grabbed from a previous query.

Try the following after this line (its shortly after the first query on the page)

extract($p_array);

After that line enter the following lines

Code:
echo "$sql_get_player_txt<br>";
echo ''.print_r($p_array, true);
Let me know what that gives you.

That code snippet above contains and HTML break tag "br" (but not in quotes- can't put it here) that it is removing at the end of the first line within the quotes. Its not necessary but will make the debug output easier to read.

As you have already noticed a query below your problem query is using $lid, changing that query to use that instead of $LEAGUE_ID might also fix the problem since $lid is set in the bodi_header.php file, it didn't need to get the league id from the query that is pulling the player info.

Try one of the other or both and let me know what happens.
__________________
Dave
HFTC Commish

Last edited by DaveHorn; 05-19-2005 at 04:21 PM.
DaveHorn is offline  
Old 05-19-2005, 04:50 PM   #19
Hoeksam
Minors (Double A)
 
Hoeksam's Avatar
 
Join Date: Oct 2003
Location: Ravena, NY
Posts: 160
First Test: I went back and added your two lines of code where you indicated in the league file.
Result: It was giving me the same error, except that it printed out the entire select statement for the array the error describes.

Second Test: Went back, commented out the code you gave me, replaced the two portions of code I originally did (changing $LEAGUE_ID to $lid)
Result: Same error as before (where first argument should be array). The page does show some of the layout and format of what I believe the page should look like (player general information up top [position, age, birthday, etc..], then misc. info [loyalty, leadership, etc...], then a Skills section [looks like they're only hitting skills, though... test player I select is a pitcher], then a Defense section under there, where it tells me that the select statement for ratings_desc is invalid)

Third Test: Both your code snipet along with the $lid change
Result: Same result as second test, with the exception that the huge select statement printed out in the first test appears again.


If it'll be easier for you, feel free to contact me via e-mail (wplcommish@gmail.com) or hit me up on AIM if you see me (s/n: WPLCommish).

Thanks.
__________________
The tower of power, too sweet to be sour...

Elite Baseball League - Milwaukee Brewers

Right this way, everyone. Free puppies, ginger snaps, pocket PC's...
Hoeksam is offline  
Old 05-19-2005, 05:08 PM   #20
Hoeksam
Minors (Double A)
 
Hoeksam's Avatar
 
Join Date: Oct 2003
Location: Ravena, NY
Posts: 160
I think I may have found the problem. It appears that a bunch of miscellaneous tables (such as CLUTCH, CONSISTENCY, etc.. ) were never populated when I did the initial import of the league.

How I found this: Was looking at why I was getting a "Query was invalid" statement for the players position rating, so I went in to check out the RATING_AE table and found that it didn't have any information populated in it. Since the error was telling me that it could find the RATING_AE_DESC for a certain value, I plugged the value into the table along with a rating, and the query suddenly worked when I refreshed the page.

So I guess my next question is... how do I get these tables to populate when clicking "Import All" apparently doesn't do the trick? (or did I miss this step when setting up the league...)
__________________
The tower of power, too sweet to be sour...

Elite Baseball League - Milwaukee Brewers

Right this way, everyone. Free puppies, ginger snaps, pocket PC's...
Hoeksam is offline  
 

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:53 AM.

 

Major League and Minor League Baseball trademarks and copyrights are used with permission of Major League Baseball. Visit MLB.com and MiLB.com.

Officially Licensed Product – MLB Players, Inc.

Out of the Park Baseball is a registered trademark of Out of the Park Developments GmbH & Co. KG

Google Play is a trademark of Google Inc.

Apple, iPhone, iPod touch and iPad are trademarks of Apple Inc., registered in the U.S. and other countries.

COPYRIGHT © 2023 OUT OF THE PARK DEVELOPMENTS. ALL RIGHTS RESERVED.

 

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