|
||||
|
![]() |
#1 | |
Minors (Double A)
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:
PHP Code:
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... |
|
![]() |
![]() |
#2 |
All Star Starter
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();?> |
![]() |
![]() |
#3 |
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 ![]() ![]() |
![]() |
![]() |
#4 |
Minors (Double A)
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... |
![]() |
![]() |
#5 |
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 ![]() ![]() |
![]() |
![]() |
#6 | |
Minors (Double A)
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:
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... |
|
![]() |
![]() |
#7 |
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 ![]() ![]() |
![]() |
![]() |
#8 |
Minors (Double A)
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... |
![]() |
![]() |
#9 | |
Minors (Double A)
Join Date: Oct 2003
Location: Ravena, NY
Posts: 160
|
Quote:
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... |
|
![]() |
![]() |
#10 |
All Star Starter
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(); ? 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. |
![]() |
![]() |
#11 | |
All Star Starter
Join Date: Aug 2003
Posts: 1,146
|
Quote:
|
|
![]() |
![]() |
#12 |
All Star Starter
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); Code:
error_reporting(E_ERROR); 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. |
![]() |
![]() |
#13 |
Minors (Double A)
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... |
![]() |
![]() |
#14 |
Minors (Double A)
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... |
![]() |
![]() |
#15 | |
All Star Starter
Join Date: Aug 2003
Posts: 1,146
|
Quote:
http://www.hitforthecycle.com/bosi/standings.php?lid=3 |
|
![]() |
![]() |
#16 | |
Minors (Double A)
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:
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... |
|
![]() |
![]() |
#17 |
Minors (Double A)
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... |
![]() |
![]() |
#18 |
All Star Starter
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); 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. Last edited by DaveHorn; 05-19-2005 at 04:21 PM. |
![]() |
![]() |
#19 |
Minors (Double A)
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... |
![]() |
![]() |
#20 |
Minors (Double A)
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... |
![]() |
Bookmarks |
|
|