The code executes fine and does all it suppose to do... I am thinking that something in the session or the DB is causing the server to throw an error. Anyone have ideas?
I pasted a couple lines of meaningless code at the end "e.g. put "test" into gTest. just to see what would happen, I can step through that code fine and get no errors... so it has something to do with getting to the end of this entire script which is causing the errors.
For help, you could probably just look past the breakpoint in the code... I just left in the full code in case I was doing something that changed a configuration or caused an error.
Code: Select all
<?lc
  global gDataBaseId
 
  require "/home/*******/*******/cgi-bin/dblib.lc"
   put $_POST["tSession"] into tGame	
   put $_POST["player"] into tPLayer	
   put $_POST["playerType"] into tPlayerType
  -- ***delete me before deploying***
  -- this is so I can use the on-rev degugger and not require the post from the application
   put "name|12345" into tGame
   put "67890" into tPLayer
   put "abc" into tPLayerType
  -- ***/delete me***
   -- open the db
   get libDBOpenDataBase("*****DBkey******")
  
  -- start the session
   set the sessionSavePath to "/home/*****/*****/sessions"
   set the sessionID to tGame
   start session
  
  -- if the player is the judge remove the judge.
   if tPlayerType = "judge" then
       put empty into $_SESSION["judgeName"]
   end if
   -- remove the playername from the playerlist
   put  $_SESSION["playerList"] into tPlayerList
   set the wholematches to true
   put lineOffset(tPLayer,tPLayerList) into tLineNum
   delete line tLineNum of tPLayerList
   put tPlayerList into $_SESSION["playerList"]
	
  breakpoint
   -- save the number of players to the session
  put the number of lines of tPLayerList into tNumPLayers
  put  tNumPlayers into $_SESSION["numPlayers"]
  -- If this is the last player in the session, then delete the session and the db entry
  if tNumPlayers = 0 then
      delete session
      get libBDDelete("activeGames", "gameName", tGame)
      revCloseDatabase gDataBaseId
  else
     stop session
  end if
?>
Thanks for any help.
