Jump to content

jcanker

Members
  • Posts

    252
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

jcanker's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. No love in Edge: file output after several refreshes (same result in IE11 on Win 10Pro): Cookie set. Run again to see if the cookie is sent back. Cookies sent by the browser: array(0) { }
  2. EDIT: I'm a dorkfish...ignore the post if you already saw it--I wasn't using Edge I will report back in a sec It seems to like that little bit at least I saved your code to testing/setCookieTest.php and ran it then refreshed to run the 2nd time Here is the output from running the file the 2nd (or 3rd or 4th) time by refreshing the page Cookie set. Run again to see if the cookie is sent back. Cookies sent by the browser: array(2) { ["cookie_test"]=> string(4) "test" ["PHPSESSID"]=> string(26) "imi9uedj5jmerpdn9u7vhhu0h5" }
  3. First off, met me say that I've seen the recent topic on session/redirect http://forums.phpfreaks.com/topic/300903-session-is-dropped-after-redirect/ and worked with the domain for redirect and it did not affect anything. I've been looking all around and cannot find a solid answer. The application I have been slowly creating has worked fine in Chrome, Firefox, and IE 7-11 **On Windows 7**. Yesterday I upgraded my dev laptop to Win10 Pro and started testing with the Edge browser. The user cannot log in successfully with Edge Browser because a new session is created after the php script to process login uses header(Location:....). There are no issues with Chrome, Firefox on Win10Pro, but IE11 on this Win10Pro machine is showing the same symptoms as Edge. Here are the facts/factors: This is all running on a dev laptop with IIS Express using FastCGI. The browser is running on same machine. start_session() is at the top of every page in the application immediately after the require_once calls. //get includes require_once("../../../sys/php/includes/dbFns.php"); require_once("../../../sys/php/includes/userAuthFns.php"); require_once("../../../sys/php/includes/outputFns.php"); //start session $result = session_start(); if(!$result){echo "<br/>Could not start session!</br>"; die();} //grab the page name and path for the logs $page = $_SERVER["REQUEST_URI"]; //grab the user's IP address for the security checks $_SESSION['remote_addr'] = $_SERVER['REMOTE_ADDR']; If username/password combo is successful, code uses header() to redirect to "logged.html." If fails, it uses header() to forward to "notLogged.html" "logged.html" contains jQuery which makes an AJAX call to a php page which checks session info for a valid login session. If session login info not found it redirects to notLogged.html. When user uses Edge browser, a session is created and the correct login info is stored in the session. I can see the session in Windows/Temp and when I open it, it holds the expected info. If I comment out the echo print_r($_SESSION) lines in the code block below it shows the correct info in the $_SESSION array. When the redirect to logged.html occurs a new session is created. I can see the session file in Windows/Temp; file size is 0 and is empty when opened in notepad. All redirects using either jQuery/javascript or PHP's header() use relative links. In my research I saw several suggestions to use session_write_close() just prior to the redirect. This did not solve the issue. To ensure the domain is not causing the issue I commented out the header() using the relative link and instead used a link including the domain info (did not fix the issue): ////////////////////////////////////////////////////////////// // Expose this next block for testing purposes only to // display the SESSION data //////////////////////////////////////////////////////////////// //echo "<pre>"; //echo print_r($_SESSION); //echo "</pre>"; ///// END SESSION DISPLAY FOR TESTING BLOCK ///////////////////// //redirect to the logged-in page--comment out for testing SESSION, include in production session_write_close(); // header("Location: ../../logged.html"); header("Location: http://7_0.leagueledger.com/logged.html"); exit(); When Edge reaches logged.html and runs the AJAX check to ensure the $_SESSION data shows the user as logged in, it fails because it is looking at the new, empty session and then redirects to notLogged.html as it is designed to do. (javascript alerts helped me trace the progress). PHP.ini is set to use cookies; however I don't see a cookie being created for this site. I enabled cookies via Group Policy and cookies for other websites are showing up. I am referencing the folders: C:\Users\**username**\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\#!001\MicrosoftEdge\Cookies​ C:\Users\**username**\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\#!001\MicrosoftEdge\Cookies​​ Here is the pertinent section of PHP.infoDirective Local Value Master Value session.auto_start Off Off session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_httponly Off Off session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_divisor 1000 1000 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.hash_bits_per_character 5 5 session.hash_function 0 0 session.lazy_write On On session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path C:\Windows\temp C:\Windows\temp session.serialize_handler php php session.upload_progress.cleanup On On session.upload_progress.enabled On On session.upload_progress.freq 1% 1% session.upload_progress.min_freq 1 1 session.upload_progress.name PHP_SESSION_UPLOAD_PROGRESS PHP_SESSION_UPLOAD_PROGRESS session.upload_progress.prefix upload_progress_ upload_progress_ session.use_cookies On On session.use_only_cookies On On session.use_strict_mode Off Off session.use_trans_sid 0 0 Although the php.ini says the session filename will prepend PHPSESSID, it actually is just using "sess", e.g. ​sess_cvfjqh4tlelh86fgs06emsg0q3 This is true for all browsers, not just Edge This is a head scratcher to me since it works perfectly in Chrome/Firefox and was fine in IE 11 when this was a Win7 machine. Any assistance will be greatly appreciated. ​
  4. I'm trying to get the id of the parent container of the dragged/dropped element. Currently it is reporting only the original container it was in before it was dragged the first time, regardless of how many times it is dragged. Here's the relevant code: //make the batter and baserunners draggable $('.batter').draggable({ start: function() { $("#5-4").html("we dragged"); $(this).css({"margin-top":"0px"}) }, stop:function(){ alert($(".batter").parent().attr('id')); }//end stop function });//end batter draggable A container DIV is broken into smaller DIVs making a 5x5 grid. Each of those DIVs have an ID corresponding to ROW-COL, e.g. the upper most box is id='1-1', the first box in the 3rd row is id='3-1', the last box in the 3rd row is id='3-5'. Currently it only reports 5-3, the starting location. Sample up at http://alpha.centraldbs.com/html/scorekeeper/scorekeeper.html
  5. Figured it out: I had copied/pasted the input blocks when I created the form and forgot to change the name and id. It's working now that it has a unique id.
  6. I've used datepicker before, and it's pretty simple to implement. On my current project, however, it displays the datepicker without issue, but when I click the date it's tries to follow the '#' link that's generated rather than grabbing the date and populating the input block with it. What is causing this to NOT follow the prevent default and to try to follow the link? The html for this page is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="http://fonts.googleapis.com/css?family=Cardo" rel="stylesheet" type="text/css"> <link href="http://fonts.googleapis.com/css?family=Lato:400,400italic" rel="stylesheet" type="text/css"> <script src="javascript/galleria/galleria-1.2.9.min.js"></script> <script src="javascript/jquery-1.9.1.min.js"></script> <script src="javascript/jquery.slides.min.js"></script> <script src="javascript/jquery-ui-1.10.3.custom.min.js"></script> <link rel="stylesheet" type="text/css" href="css/gahmusa.css"> <link rel="stylesheet" media="screen" href="css/superfish/superfish.css"> <!-- <link rel="stylesheet" media="screen" href="css/superfish/superfish-navbar.css"> --> <link rel="stylesheet" media="screen" href="css/jquery-ui-1.10.3.custom.css"> <script src="javascript/superfish/hoverIntent.js"></script> <script src="javascript/superfish/superfish.js"></script> <title>Website Administration Portal</title> <!-- initialise Superfish Menus--> <script> jQuery(document).ready(function(){ jQuery("ul.sf-menu").superfish({ pathClass: "current", cssArrows: false }); }); </script> <!-- Initialize TinyMCE--> <script type="text/javascript" src="<your installation path>/tinymce/tinymce.min.js"></script> <script type="text/javascript"> tinymce.init({ selector: "textarea" }); </script> </head> <body> <div id="banner"> <a href="default.php"><img src="images/400px_Foundation.png" style="float:left;padding-left:80px;width:400px"/> <img src="images/400px_Museum.png" style="float:left;width:400px"/></a> </div> <div class="lato16"> <ul class="sf-menu"> <li class="topLevel"><a href="visit.php" >VISIT THE MUSEUM</a> <ul> <li><a href="about.php" >ABOUT THE MUSEUM</a></li> <li><a href="groups.php" >GROUPS & TOURS</a></li> <li><a href="events.php" >EVENTS AND RENTALS</a></li> <li><a href="oralhistory.php" >ORAL HISTORY</a></li> <li><a href="volunteer.php" >VOLUNTEERS & INTERNSHIPS</a></li> </ul> </li> <li id="secondTopLevel" class="topLevel" ><a href="explore.php" >EXPLORE OUR EXHIBITS</a> <ul> <li><a href="currentExhibit.php" >CURRENT EXHIBIT</a></li> <!-- <li><a href="permanentExhibits.php" >PERMANENT EXHIBITS</a> <ul> <li><a href="timeline.php" >TIMELINE</a></li> </ul> </li> <li><a href="futureExhibits.php" >FUTURE EXHIBITS</a></li> <li><a href="programs.php" >PROGRAMS</a></li> --> </ul> </li> <li id="lastTopLevel" class="topLevel"><a href="join.php" >THE FOUNDATION</a> <ul> <li><a href="mission.php">MISSION</a></li> <li><a href="leadership.php">FOUNDATION LEADERS</a></li> <li><a href="dga.php">DISTINGUISHED<br/>GERMAN-AMERICAN<br/>OF THE YEAR ™</a></li> <li><a href="ongoingPrograms.php">ONGOING PROGRAMS</a></li> <li><a href="#" >KEEP THE HERITAGE ALIVE</a> <ul> <li> <a href="waysToGive.php" >WAYS TO GIVE</a> <!-- <ul> <li><a href="membership.php" >MEMBERSHIP</a></li> <li><a href="volunteer.php">VOLUNTEERS & INTERNSHIPS</a></li> </ul>--> </li> </ul> </li> </ul> </li> <li class="stretch"></li> </ul> </div> <div style="clear:both></div> <!--[if lt IE 7]><script type="text/javascript" src="javascript/iehoverfix.js"></script><![endif]--> <div id="TemplateHead" style="background-color:#fff"; ><!--width = 400 w/ 80px padding--> <div id="titleTextContainer" style="width:320px;margin-left:80px;" ><!--start 80 px in, 320px wide--> <div id="titleText" style="width:550px; float:left;margin-top:20px;margin-bottom:20px;"><!--268px wide--> <span class="lato48">Administration Portal</span> </div> <div id="titleSubText" style="width:525px;float:left "><!--268px wide--> <span class="cardoItal18">Use This Portal To Administer the GAHMUSA Website</span> </div> </div> <div id="titlePhotoContainer" style="margin-left:600px;text-align:center"> <img src="images/denkmal_cutout.png" height="200px"/> </div> </div> <script> $(function() { $( ".datepicker" ).datepicker(); }); </script> <div id="tagline" class="lato26" style="margin:0px;background-color:#FCD209; text-align:left"> CREATE NEW EVENT IN SCHEDULE </div> <div class="oneThird" style="background: #ffffff;"> <div class="oneThirdHeader"></div> <div class="oneThirdLeft"> </div> <div class="oneThirdRight"> <p> <form id='createEventForm' name='createEventForm' action='php/procCreateEvent.php' method='POST'> <table id='createEventTable' name='createEventTable' style='width:100%'> <tr> <td>Event Name/ Headline</td> <td><input name='eventName' id='eventName' size='55'/></td> </tr> <tr> <td>Event Date</td> <td><input class='datepicker' name='eventName' id='eventName' size='20'/></td> </tr> <tr> <td>Event Start Time</td> <td> <select name='eventStartHour' id='eventStarthour' > <option value='00' >12 AM</option> <option value='01' >1 AM</option> <option value='02' >2 AM</option> <option value='03' >3 AM</option> <option value='04' >4 AM</option> <option value='05' >5 AM</option> <option value='06' >6 AM</option> <option value='07' >7 AM</option> <option value='08' >8 AM</option> <option value='09' >9 AM</option> <option value='10' >10 AM</option> <option value='11' >11 AM</option> <option value='12' >12 PM</option> <option value='13' >1 PM</option> <option value='14' >2 PM</option> <option value='15' >3 PM</option> <option value='16' >4 PM</option> <option value='17' >5 PM</option> <option value='18' >6 PM</option> <option value='19' >7 PM</option> <option value='20' >8 PM</option> <option value='21' >9 PM</option> <option value='22' >10 PM</option> <option value='23' >11 PM</option></select> : <select name='eventStartMin' id='eventStartMin' class='datepicker' > <option value'00'>00</option> <option value'05'>05</option> <option value'10'>10</option> <option value'15'>15</option> <option value'20'>20</option> <option value'25'>25</option> <option value'30'>30</option> <option value'35'>35</option> <option value'40'>40</option> <option value'45'>45</option> <option value'50'>50</option> <option value'55'>55</option> </select> </td> </tr> <tr> <td>Event Name/Headline</td> <td><input name='eventName' id='eventName' size='20'/></td> </tr> </table> </form> </div> <br style="clear: left;" /> </div>
  7. It seems to work if I use vertical-align:top in the CSS for each div and leave them as display:inline-block. I'm still interested in a solution of floating the divs left but preventing them from wrapping. There is a grid gameboard above this that also is using the display:inline-block to prevent wrapping when the window is resized but I'd prefer a float solution if possible.
  8. That works for the alignment, but it forces divs down into a 2nd row if they extend past the right edge of the div when the window is resized. I started using the inline-block in order to force them all on the same line. Is there a way to keep the divs from wrapping? I've tried putting them in a container with white-space:nowrap but that's not working.
  9. Yeah, there's something still forcing the first div, (the deck) to be higher than the others. I've tried copying the style statement directly as it appears in the other divs, but it is still higher than the others.
  10. Okay, removing the DIV around the text in the first block (the deck) makes them align properly in Chrome, but they're still messed up in IE....
  11. I have a div at the bottom of my page set as a container for 11 more divs, all set to be display:in-line. They line up fine and work as expected, until I start putting text into them. Then some of them are higher than the others. Even more boggling to me is that they line up differently in IE and Chrome: MY QUESTION: Why does text affect the vertical alignment of the in-line display divs? How can I get this so that 1) Text does not affect the vertical alignement and keeps them all in line with each other and 2) Text wraps properly within the div? Here's how they appear in IE and Chrome: IE: And in Chrome: This problem started when I had to adjust the word-wrap and white-space attributes because the text wasn't wrapping but was just running off the edge. I did notice at that point that without the word-wrap and white-space attributes that if I tried to force a line break with <br /> in the text did shift that div higher, so maybe the word-wrap wasn't the start of it. Here's the html. The CSS is all in-line for now until everything gets finalized, then I'll move it off into an external css. <div id="bottomGameStatusBar" style="clear:both;width:100%;background-color:white;overflow:auto;overflow-y:hidden;"> <div id="bottomGameStatusDetails"> <ul style="display:inline-block"> <li style="display:inline-block">Current Round: 10</li> <li style="display:inline-block">Current Turn: Player 2 (DisplayName)</li> <li style="display:inline-block">Current Phase: Movement</li> </ul> </div> <div id="playerDeck" style="display:inline-block; width:100px; height:100px; background-color:black; color:white; word-wrap: break-word;"><div style="word-wrap:break-word; white-space:normal;">Player Deck appears here<br/>Click to Draw</div> </div> <div id="card01" class="cardInHand" style="display:inline-block; word-wrap:break-word; white-space:normal; width:100px; height:100px; border:solid 1px black; background-color:#d3d3d3; text-align:center;">1st Card In Hand </div> <div id="card02" class="cardInHand" style="display:inline-block; word-wrap:break-word; white-space:normal;overflow:hidden; width:100px; height:100px; border:solid 1px black; background-color:#d3d3d3; text-align:center">2nd Card In Hand (if exists) </div> <div id="card03" class="cardInHand" style="display:inline-block; word-wrap:break-word; white-space:normal;width:100px; height:100px; border:solid 1px black; background-color:#d3d3d3; text-align:center">3rd Card In Hand (if exists) </div> <div id="card04" class="cardInHand" style="display:inline-block; word-wrap:break-word; white-space:normal;width:100px; height:100px; border:solid 1px black; background-color:#d3d3d3; text-align:center">4th Card In Hand (if exists) </div> <div id="card05" class="cardInHand" style="display:inline-block; word-wrap:break-word; white-space:normal;width:100px; height:100px; border:solid 1px black; background-color:#d3d3d3; text-align:center">5th Card In Hand (if exists) </div> <div id="card06" class="cardInHand" style="display:inline-block; word-wrap:break-word; white-space:normal;width:100px; height:100px; border:solid 1px black; background-color:#d3d3d3; text-align:center">6th Card In Hand (if exists) </div> <div id="card07" class="cardInHand" style="display:inline-block; word-wrap:break-word; white-space:normal;width:100px; height:100px; border:solid 1px black; background-color:#d3d3d3; text-align:center">7th Card In Hand (if exists) </div> <div id="card08" class="cardInHand" style="display:inline-block; word-wrap:break-word; white-space:normal;width:100px; height:100px; border:solid 1px black; background-color:#d3d3d3; text-align:center">8th Card In Hand (if exists) </div> <div id="card09" class="cardInHand" style="display:inline-block; word-wrap:break-word; white-space:normal;width:100px; height:100px; border:solid 1px black; background-color:#d3d3d3; text-align:center">9th Card In Hand (if exists) </div> <div id="card10" class="cardInHand" style="display:inline-block; word-wrap:break-word; white-space:normal;width:100px; height:100px; border:solid 1px black; background-color:#d3d3d3; text-align:center">10th Card In Hand (if exists) </div> </div> <!--end of bottomGameStatusBar--> This div is inside another container div: <div id="Mainboard" style="float:right; width:80%; overflow-y:auto; white-space: nowrap;text-align:center;"> All of this is at www.magicvsmachines.com/gameboardtest.html if you need the source for the parent divs
  12. BAH...why is it that I always spend an hour or more trying to solve these on my own, give up in frustration and turn here for help, and THEN find the answer just a few minutes later!? If I group by registrations.userID instead of evaldata.userID, the join returns all the rows just as I need: SELECT users.fName, users.lName, AVG(evaldata.cat1Val) FROM users LEFT OUTER JOIN registrations ON registrations.userID=users.userID LEFT OUTER JOIN evaldata ON evaldata.userID=registrations.userID WHERE registrations.ageGroupID=5 GROUP BY registrations.userID Returns the fName, lName, and AVG of the player's evaluations in category 1 for every player registered in that age group. If player doesn't have eval data in that category it returns fName, lName and NULL for cat1Val.
  13. Somewhat of a revist from my last post, but on to the next step and bigger problems I'm trying to create a sortable table that shows all the players' averaged evalulations players were likely evaluated by multiple adults, therefore there are multiple "evaluations" In TABLE: evaldata each evaluation for each player is a row I can get the AVG for each registered player within a specific age group perfectly using GROUP BY, and I can get the player's name and userID and from TABLE users with their raw eval data just fine with this query: SELECT users.fName, users.lName, evaldata.cat1Val FROM users LEFT OUTER JOIN registrations ON registrations.userID=users.userID LEFT OUTER JOIN evaldata ON evaldata.userID=registrations.userID WHERE registrations.ageGroupID=5; But the coaches need a table with the averaged values for each rating as a singe row. This works: SELECT users.fName, users.lName, AVG(evaldata.cat1Val) FROM users LEFT OUTER JOIN registrations ON registrations.userID=users.userID LEFT OUTER JOIN evaldata ON evaldata.userID=registrations.userID WHERE registrations.ageGroupID=5 THE PROBLEM IS that I also need to include players who appear in TABLE registrations but do not have any evaluation data (mostly because they missed the evaluation day). That last query returns all the players who have eval data, but ignores the players who don't have eval data and therefore don't have any rows in TABLE evaldata MY QUESTION IS: how can I get this query so that it also returns the players who are in TABLE:registrations but don't have any rows with their userID in TABLE evaldata? Strangely enough, if I add "GROUP BY evaldata.userID" at the end, it returns ONE ROW of the first userID without any data, then the AVG rows of players who do have data. Am I just joining these in the wrong order?
  14. I love it when I can answer my own question for anyone who happens to be looking for a solution later on and find it here Prior to the JOIN to attach first and last names to the userID, the query is: SELECT userID, AVG( cat1Val ) , AVG( cat2Val ) , AVG( cat3Val ) , AVG( cat4Val ) , AVG( cat5Val ) FROM evaldata WHERE evalID =1 GROUP BY userID ORDER BY AVG(cat3VAL) ASC This would allow for sortable tables on the PHP side as well by passing the column name that the customer clicked on to sort on
  15. I'm still on the baseball progam here. The players are evaluated prior to the season and rated in some broad areas, such as "fielding" (ability to throw/catch grounders, flies, long throws, etc), "pitching" and "batting" The userID for each player is in TABLE: users I'd like this application to be broad enough that the local rec soccer and softball programs could have access to it as well. Clearly they have different rating categories and different rating scales. Additionally, my son's program is discussing moving from their current 1-5 with 1 being best, 5 being worst to something like a 1-10 with 10 as best. I allow each program to define an evaluation in TABLE:evaluations which stores the seasonID the eval is for, the category names and the best possible rating, worst possible rating, for each category, etc. Each player is likely to have multiple scores (one or as many as 7) assigned by different "judges" who are watching and evaluating the players in the different categories. Each rating is stored as individual row in TABLE: evaldata. Columns are userID, evalID, cat1 (FLOAT 5,2), cat2(FLOAT 5,2), cat3(FLOAT 5,2), cat4(FLOAT 5,2), cat5(FLOAT 5,2), cat6(FLOAT 5,2), cat7(FLOAT 5,2), cat8(FLOAT 5,2), cat9(FLOAT 5,2), cat10(FLOAT 5,2) I also have (as some of you know) TABLE registrations which holds the userID of each player registered for the current season RIght now I have workign PHP that pulls the userIDs (distinct) from TABLE registrations. For each player, it then finds the rows entered in TABLE evaldata, then averages each category, and provides an overall average. Running this script on the 100-150 players an any particular age group is pretty slow. MY QUESTION IS: Is there a way to write the SQL that it can calculate the averages in each category for each player as it retrieves all the rows for a given seasonID? I'll then JOIN or UNION it to the users table to put a name to the player's userID.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.