stb74 Posted October 19, 2006 Share Posted October 19, 2006 Is there any difference in version 4.4.2 and 4.4.2-plI am running a site with a soccer stats script and use xampp on my own PC to do the coding and then upload to the server. I had recenlty made a few additions to the code which works fine with my local server but when I upload it to the live system it doesn't work.The only differences in software between local and server as far as I can see it the -pl on the php.Anyone any ideas!!Thanks Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted October 19, 2006 Share Posted October 19, 2006 Sure there is a difference else they wouldn't have released a new version.[url=http://php.net/ChangeLog-4.php]PHP 4 Changelog[/url]Edit: -pl mean it is some sort of pre-release or non-finished version. It is after RC and just before final. Quote Link to comment Share on other sites More sharing options...
stb74 Posted October 19, 2006 Author Share Posted October 19, 2006 xampp uses php 4.4.2-pl and it works with the code that I have written.I am trying to get the version that is on the server 4.4.2 working with xampp so I can try and figure out what is broke. It would be better for me if I could get the server version upgraded, but thats not going to happen. Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted October 19, 2006 Share Posted October 19, 2006 So you say that your code that is written in an enviroment using 4.4.2-pl does not work on a server that uses 4.4.2? Quote Link to comment Share on other sites More sharing options...
stb74 Posted October 19, 2006 Author Share Posted October 19, 2006 Yes Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted October 19, 2006 Share Posted October 19, 2006 What errors do you get? Maybe we can find alternative solutions. Quote Link to comment Share on other sites More sharing options...
stb74 Posted October 19, 2006 Author Share Posted October 19, 2006 I was trying to break my local version so I could figure out what the issue was, there is no point in me trying to develop apps that when I upload working copies to the server that they break. I have spoken to the hosting company and they aren't prepared to upgrade, which is understandable.If you go here and change a division you will be able to see the error.[url=http://www.nifootball.co.uk/index.php?option=com_wrapper&Itemid=65]http://www.nifootball.co.uk/index.php?option=com_wrapper&Itemid=65[/url] Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted October 19, 2006 Share Posted October 19, 2006 You need to show me the actual error. Paste it here.[quote author=stb74 link=topic=112008.msg454349#msg454349 date=1161264925]I have spoken to the hosting company and they aren't prepared to upgrade, which is understandable.[/quote]It would be downgrading since 4.4.2 is a more recent version than 4.4.2-pl. Instead you should consider upgrading to 4.4.2 or the most recent 4.4.4. Quote Link to comment Share on other sites More sharing options...
trq Posted October 19, 2006 Share Posted October 19, 2006 I changed division twice and dont see any error. How about you make it simple and tell us what it is? Quote Link to comment Share on other sites More sharing options...
stb74 Posted October 19, 2006 Author Share Posted October 19, 2006 [quote author=Daniel0 link=topic=112008.msg454352#msg454352 date=1161265098]You need to show me the actual error. Paste it here.[quote author=stb74 link=topic=112008.msg454349#msg454349 date=1161264925]I have spoken to the hosting company and they aren't prepared to upgrade, which is understandable.[/quote]It would be downgrading since 4.4.2 is a more recent version than 4.4.2-pl. Instead you should consider upgrading to 4.4.2 or the most recent 4.4.4.[/quote]Sorry thats what I meant, it also works fin with the latest version of php 5 Quote Link to comment Share on other sites More sharing options...
stb74 Posted October 19, 2006 Author Share Posted October 19, 2006 Looks like its doing something completet different now :'(Where the matches are if you change to a different team you should see the error.But this is what it says.Warning: array_multisort(): Argument #21 is expected to be an array or a sort flag in /home/nifootball/domains/nifootball.co.uk/public_html/leagues/amateurleague/includes/tabledata.php on line 232If I remove the details that I use to change the teams the table and this code will work fine. Quote Link to comment Share on other sites More sharing options...
trq Posted October 19, 2006 Share Posted October 19, 2006 You need to post some relevent code. Quote Link to comment Share on other sites More sharing options...
stb74 Posted October 19, 2006 Author Share Posted October 19, 2006 thorpe My apologies for looking to get prompted as I have tried to get help in other forums and in some I have put too much information and other I haven't put enough.There is a lot of code in this should I post it all.ThanksScott Quote Link to comment Share on other sites More sharing options...
trq Posted October 19, 2006 Share Posted October 19, 2006 [quote]There is a lot of code in this should I post it all.[/quote]No, post [b]relevent[/b] code. Quote Link to comment Share on other sites More sharing options...
stb74 Posted October 19, 2006 Author Share Posted October 19, 2006 [code]<?php include('../../Connections/nifootball_stats.php'); include ('includes/prefs.php'); include ('includes/lastupdated.php'); include ('includes/leaguedata.php'); // Start Loop and read teams in to Table. $i = 0; do { $team[$i] = $row_get_teams['name']; $teamid[$i] = $row_get_teams['id']; //$teamstatus[$i] = $row_get_teams['status']; // Get Home Wins mysql_select_db($database_nifootball_stats, $nifootball_stats); $query_home_wins = "SELECT COUNT(DISTINCT LM.matchID) AS homewins FROM nafl_matches LM WHERE LM.matchHomeWin = '$teamid[$i]' AND LM.matchSeasonID LIKE '$defaultseasonid' AND LM.matchDivisionID LIKE '$defaultdivisionid' "; $home_wins = mysql_query($query_home_wins, $nifootball_stats) or die(mysql_error()); $row_home_wins = mysql_fetch_assoc($home_wins); $totalRows_home_wins = mysql_num_rows($home_wins); //Home wins into the table $homewins[$i] = $row_home_wins['homewins']; mysql_free_result($home_wins); // Get Away Wins mysql_select_db($database_nifootball_stats, $nifootball_stats); $query_away_wins = "SELECT COUNT(DISTINCT LM.matchID) AS awaywins FROM nafl_matches LM WHERE LM.matchAwayWin = '$teamid[$i]' AND LM.matchSeasonID LIKE '$defaultseasonid' AND LM.matchDivisionID LIKE '$defaultdivisionid' "; $away_wins = mysql_query($query_away_wins, $nifootball_stats) or die(mysql_error()); $row_away_wins = mysql_fetch_assoc($away_wins); $totalRows_away_wins = mysql_num_rows($away_wins); $awaywins[$i] = $row_away_wins['awaywins']; mysql_free_result($away_wins); // Get Home Draws mysql_select_db($database_nifootball_stats, $nifootball_stats); $query_home_draws = "SELECT COUNT(DISTINCT LM.matchID) AS homedraws FROM nafl_matches LM WHERE LM.matchHomeDraw = '$teamid[$i]' AND LM.matchSeasonID LIKE '$defaultseasonid' AND LM.matchDivisionID LIKE '$defaultdivisionid' "; $home_draws = mysql_query($query_home_draws, $nifootball_stats) or die(mysql_error()); $row_home_draws = mysql_fetch_assoc($home_draws); $totalRows_home_draws = mysql_num_rows($home_draws); //Home draws into the table //$row_home_draws = mysql_fetch_assoc($home_draws); $homedraws[$i] = $row_home_draws['homedraws']; mysql_free_result($home_draws); // Get Away Draws mysql_select_db($database_nifootball_stats, $nifootball_stats); $query_away_draws = "SELECT COUNT(DISTINCT LM.matchID) AS awaydraws FROM nafl_matches LM WHERE LM.matchAwayDraw = '$teamid[$i]' AND LM.matchSeasonID LIKE '$defaultseasonid' AND LM.matchDivisionID LIKE '$defaultdivisionid' "; $away_draws = mysql_query($query_away_draws, $nifootball_stats) or die(mysql_error()); $row_away_draws = mysql_fetch_assoc($away_draws); $totalRows_away_draws = mysql_num_rows($away_draws); $awaydraws[$i] = $row_away_draws['awaydraws']; mysql_free_result($away_draws); // Get Home Loses mysql_select_db($database_nifootball_stats, $nifootball_stats); $query_home_loses = "SELECT COUNT(DISTINCT LM.matchID) AS homeloses FROM nafl_matches LM WHERE LM.matchHomeLose = '$teamid[$i]' AND LM.matchSeasonID LIKE '$defaultseasonid' AND LM.matchDivisionID LIKE '$defaultdivisionid' "; $home_loses = mysql_query($query_home_loses, $nifootball_stats) or die(mysql_error()); $row_home_loses = mysql_fetch_assoc($home_loses); $totalRows_home_loses = mysql_num_rows($home_loses); //Home loses into the table $homeloses[$i] = $row_home_loses['homeloses']; mysql_free_result($home_loses); // Get Away Loses. mysql_select_db($database_nifootball_stats, $nifootball_stats); $query_away_loses = "SELECT COUNT(DISTINCT LM.matchID) AS awayloses FROM nafl_matches LM WHERE LM.matchAwayLose = '$teamid[$i]' AND LM.matchSeasonID LIKE '$defaultseasonid' AND LM.matchDivisionID LIKE '$defaultdivisionid' "; $away_loses = mysql_query($query_away_loses, $nifootball_stats) or die(mysql_error()); $row_away_loses = mysql_fetch_assoc($away_loses); $totalRows_away_loses = mysql_num_rows($away_loses); $awayloses[$i] = $row_away_loses['awayloses']; mysql_free_result($away_loses); // Get Home Goals For. mysql_select_db($database_nifootball_stats, $nifootball_stats); $query_home_goals = "SELECT SUM( LM.matchHomeGoals) AS homegoals FROM nafl_matches LM WHERE LM.matchHomeID = '$teamid[$i]' AND LM.matchSeasonID LIKE '$defaultseasonid' AND LM.matchDivisionID LIKE '$defaultdivisionid'"; $home_goals = mysql_query($query_home_goals, $nifootball_stats) or die(mysql_error()); $row_home_goals = mysql_fetch_assoc($home_goals); $totalRows_home_goals = mysql_num_rows($home_goals); if(is_null($row_home_goals['homegoals'])) $homegoals[$i] = 0; else $homegoals[$i] = $row_home_goals['homegoals']; mysql_free_result($home_goals); // Get Away Goals For. mysql_select_db($database_nifootball_stats, $nifootball_stats); $query_away_goals = "SELECT SUM( LM.matchAwayGoals) AS awaygoals FROM nafl_matches LM WHERE LM.matchAwayID = '$teamid[$i]' AND LM.matchSeasonID LIKE '$defaultseasonid' AND LM.matchDivisionID LIKE '$defaultdivisionid'"; $away_goals = mysql_query($query_away_goals, $nifootball_stats) or die(mysql_error()); $row_away_goals = mysql_fetch_assoc($away_goals); $totalRows_away_goals = mysql_num_rows($away_goals); if(is_null($row_away_goals['awaygoals'])) $awaygoals[$i] = 0; else $awaygoals[$i] = $row_away_goals['awaygoals']; mysql_free_result($away_goals); // Get Home Goals Against. mysql_select_db($database_nifootball_stats, $nifootball_stats); $query_home_goals_against = "SELECT SUM( LM.matchAwayGoals) AS homegoalsagainst FROM nafl_matches LM WHERE LM.matchHomeID = '$teamid[$i]' AND LM.matchSeasonID LIKE '$defaultseasonid' AND LM.matchDivisionID LIKE '$defaultdivisionid'"; $home_goals_against = mysql_query($query_home_goals_against, $nifootball_stats) or die(mysql_error()); $row_home_goals_against = mysql_fetch_assoc($home_goals_against); $totalRows_home_goals_against = mysql_num_rows($home_goals_against); if(is_null($row_home_goals_against['homegoalsagainst'])) $homegoalsagainst[$i] = 0; else $homegoalsagainst[$i] = $row_home_goals_against['homegoalsagainst']; mysql_free_result($home_goals_against); //Away Goals Against. mysql_select_db($database_nifootball_stats, $nifootball_stats); $query_away_goals_against = "SELECT SUM( LM.matchHomeGoals) AS awaygoalsagainst FROM nafl_matches LM WHERE LM.matchAwayID = '$teamid[$i]' AND LM.matchSeasonID LIKE '$defaultseasonid' AND LM.matchDivisionID LIKE '$defaultdivisionid'"; $away_goals_against = mysql_query($query_away_goals_against, $nifootball_stats) or die(mysql_error()); $row_away_goals_against = mysql_fetch_assoc($away_goals_against); $totalRows_away_goals_against = mysql_num_rows($away_goals_against); if(is_null($row_away_goals_against['awaygoalsagainst'])) $awaygoalsagainst[$i] = 0; else $awaygoalsagainst[$i] = $row_away_goals_against['awaygoalsagainst']; mysql_free_result($away_goals_against); // //Calculates points and matches // $wins[$i] = ($homewins[$i]+$awaywins[$i]); $draws[$i] = ($homedraws[$i]+$awaydraws[$i]); $loses[$i] = ($homeloses[$i]+$awayloses[$i]); $goals_for[$i] = ($homegoals[$i] + $awaygoals[$i]); $goals_against[$i] = ($homegoalsagainst[$i] + $awaygoalsagainst[$i]); // //Lets make change in points if there are data in nafl_deductedpoints-table // mysql_select_db($database_nifootball_stats, $nifootball_stats); $query_get_deductions = " SELECT points FROM nafl_deductedpoints WHERE seasonid LIKE '$defaultseasonid' AND teamid = '$teamid[$i]' LIMIT 1"; $get_deductions = mysql_query($query_get_deductions, $nifootball_stats) or die(mysql_error()); $row_get_deductions = mysql_fetch_assoc($get_deductions); $totalRows_get_deductions = mysql_num_rows($get_deductions); $temp_points = 0; if( mysql_num_rows($get_deductions) > 0) { do { $temp_points = $temp_points + $row_get_deductions['points']; } while($row_get_deductions = mysql_fetch_assoc($get_deductions)) ; } mysql_free_result($get_deductions); $points[$i] = $temp_points + (($homewins[$i]+$awaywins[$i])*$for_win) + (($homedraws[$i]+$awaydraws[$i])*$for_draw) + (($homeloses[$i]+$awayloses[$i])*$for_lose); $pld[$i] = $homewins[$i]+$homedraws[$i]+$homeloses[$i]+$awaywins[$i]+$awaydraws[$i]+$awayloses[$i]; // //Calculates goal difference // $diff[$i] = ($homegoals[$i] + $awaygoals[$i]) - ($homegoalsagainst[$i] + $awaygoalsagainst[$i]); $i++; } while($row_get_teams = mysql_fetch_assoc($get_teams)); // End Loop and read teams in to Table. $qty = $totalRows_get_teams; // Sort By Points array_multisort($points, SORT_DESC, SORT_NUMERIC, $diff, SORT_DESC, SORT_NUMERIC, $goals_for, SORT_DESC, SORT_NUMERIC, $wins, SORT_DESC, SORT_NUMERIC, $goals_against, SORT_ASC, SORT_NUMERIC, $draws, $loses, $pld, SORT_DESC, SORT_NUMERIC, $team, $homewins, $homedraws, $homeloses, $awaywins, $awaydraws, $awayloses, $homegoals, $homegoalsagainst, $awaygoals, $awaygoalsagainst);?>[/code] Quote Link to comment Share on other sites More sharing options...
stb74 Posted October 19, 2006 Author Share Posted October 19, 2006 guys While I'm not sure what I am doing I do think that the problem is with the forms.In the index.php which displays the league table I have a form that you change the season and division.Then within the matches.php I have another form that you use to change the teams matches. If I take this code out then the league table will display ok.Here is the index.php form[code]echo "<form method=\"post\" action=\"\">";echo '<table width="100%" border="1" cellspacing="1" cellpadding="5" bgcolor="CCCCCC">'; echo '<tr>'; echo '<td>'; echo "Season: "; echo '<select name="season">'; do { if ($row_seasons['seasonID'] == $defaultseasonid) { echo "<option value=\"$row_seasons[seasonID]\" SELECTED>$row_seasons[seasonName]</option>\n"; } else echo "<option value=\"$row_seasons[seasonID]\">$row_seasons[seasonName]</option>\n"; } while($row_seasons = mysql_fetch_assoc($seasons)); mysql_free_result($seasons); echo '</select>'; echo "<input type=\"submit\" value=\"Go\" name=\"submit_season\">"; echo '</td>'; echo '<td align="right">'; echo "Division: "; echo '<select name="division">'; do { if ($row_divisions['divisionID'] == $defaultdivisionid) { echo "<option value=\"$row_divisions[divisionID]\" SELECTED>$row_divisions[divisionName]</option>\n"; } else echo "<option value=\"$row_divisions[divisionID]\">$row_divisions[divisionName]</option>\n"; } while($row_divisions = mysql_fetch_assoc($divisions)); mysql_free_result($divisions); echo '</select>'; echo "<input type=\"submit\" value=\"Go\" name=\"submit_division\">"; echo '</td>'; echo '</tr>';echo '</table>';echo '</form>';[/code]Here is the matches.php form[code]echo "<form method=\"post\" action=\"\">"; echo '<table width="100%" cellspacing="1" cellpadding="5" bgcolor="CCCCCC">'; echo '<tr>'; echo '<td align="right" valign="top" class="matchhead">'; echo "Matches: "; echo '<select name="team">'; echo '<option value="0">All Matches</option>'; do { echo "<option value=\"$row_team_matches[teamID]\">$row_team_matches[teamName]</option>\n"; } while($row_team_matches = mysql_fetch_assoc($team_matches)); mysql_free_result($team_matches); echo '</select>'; echo "<input type=\"submit\" value=\"Go\" name=\"submit_team\">"; echo '</td>'; echo '</tr>'; echo '</table>'; echo '</form>';[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.