Jump to content

z0mb1

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

z0mb1's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. OK - stand by for the weird freakshow Completely bugged out by this and unable sleep I have eventually solved the problem... In register.php comment out the line <link href="" rel="stylesheet" type="text/css"/> Still no cigar for me because quite why an empty <link> href attribute value should cause problems with Firefox remains an outstanding question. A more pressing question is who do I report this bug to? PHP or Mozilla? I still have no idea as to the possible mechanism for this behaviour. Time to fire up a proxy and dig deeper.
  2. do you have mail configured on your server?
  3. Hi nethnet If you are seeing uName and uPasswd values persist to activate.php with a Moz client can you tell me something about your platform and client version? TIA ABW
  4. I'm confused now, What is it that really want to do? As a general rule I find that there are simple workarounds to tricky ideas
  5. Hi revrez I'm attempting to avoid clutter but if you insist index.php <?php error_reporting(E_ALL); // suppress warning messages session_start(); // initialise session session_destroy(); // initialise session ?> <?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Session Test - Apply</title> <meta name="Author" content="" /> <meta name="Keywords" content="" /> <meta name="Description" content="" /> <link href="" rel="stylesheet" type="text/css"/> <style type="text/css"></style> </head> <body> <h1>Registration Form</h1> <form method="post" action="register.php"> <p> User Name : <input type="text" name="uName" value="" size="20" maxlength="40"/><br /><br /> Password : <input type="password" name="uPasswd"/><br /><br /> <input type="submit" name="regSubmit" value="Submit"/> </p> </form> </body> </html> register.php <?php error_reporting(E_ALL); // suppress warning messages session_start(); // initialise session ?> <?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb"> <head> <title>Session Test - Register</title> <meta name="Author" content="mk05@gre.ac.uk" /> <meta name="Keywords" content="" /> <meta name="Description" content="" /> <link href="" rel="stylesheet" type="text/css"/> <style type="text/css"></style> <script type="text/javascript"><!-- --></script> </head> <body> <h1>Registration</h1> <p> Thank you for registering<br /> Please check your email to get your secret key </p> <form method="post" action="activate.php"> <p> Secret key : <input type="text" name="secretKey" value="" size="20" maxlength="40"/><br /><br /> <input type="submit" name="activate" value="Submit"/> </p> </form> <p> User name is <?php echo $_POST['uName'] ?> <br /> Password is <?php echo $_POST['uPasswd'] ?> </p> <p>SESSION contains</p><pre> <?php $_SESSION['uName'] = $_POST['uName']; $_SESSION['uPasswd'] = $_POST['uPasswd']; $_SESSION['foo'] = 'fufu'; print_r($_SESSION); ?> </pre> <p><a href="register.php" title="">reload this page</a></p> </body> </html> activate.php <?php error_reporting(E_ALL); // suppress warning messages session_start(); // initialise session ?> <?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb"> <head> <title>Session Test - Activate</title> <meta name="Author" content="mk05@gre.ac.uk" /> <meta name="Keywords" content="" /> <meta name="Description" content="" /> <link href="" rel="stylesheet" type="text/css"/> <style type="text/css"></style> <script type="text/javascript"><!-- --></script> </head> <body> <h1>Activate</h1> <p>You sent by POST<br /> Secret : <?php echo $_POST['secretKey'] ?> </p><p> In the SESSION are<br /> Name : <?php echo $_SESSION['uName'] ?><br /> Password : <?php echo $_SESSION['uPasswd'] ?> </p> <p>POST :</p> <pre><?php print_r($_POST) ?></pre> <p>SESSION :</p> <pre><?php print_r($_SESSION) ?></pre> <p> <a href="index.php">Back to the begining</a> </p> </body> </html>
  6. I'm not convinced that those two should show the same although this sort of thing makes my head hurt it depends upon what you mean by 1 1st day of the week 1st day of the month 1st day of the year not sure but I don't get the same from each either
  7. HI I would go with kenrbnsn run phpinfo() to check BTW - that code style is pretty old school if your ISP has turned off register_globals, which would be a sensible thing to do, you can usually get old code working with a single line.... extract($_POST); see extract docs for details HTH
  8. Hi all I wonder if there is some confusion POST input from index.php is passed to register.php This input is assigned to SESSION vars in register.php register.php ends with print_r $_SESSION to show what is in there enter an key in register.php and submit the key POST'ed to activate.php but the SESSION loses the variable assignments (uName & uPasswd) curiously it does not lose the literal assignment (foo) and only with Moz clients!!!
  9. Hi revraz look at the next page register.php to see the allocation to $_SESSION some of these allocations are lost on moving forward to activate.php but not all
  10. Hi revraz The session_destroy() works fine, removes other session garbage from experiments. Removing it doesn't make things work.
  11. Hi nethnet I am boggled On my local Firefox (2.0.0.12) I can kill the browser, delete all cookies and I don't see the uName and uPasswd persist, although foo does. If I remote to another desktop with another Firefox (2.0.0.11) or Mozilla (1.7.10) I still do not see uName and uPasswd values on the activate.php page Everything works in other browsers on other desktops. If you are seeing this work and I don't mystery deepens further still :-\
  12. http://staffweb.cms.gre.ac.uk/~mk05/session/index.php.txt etc. reveals the sources - only from the apache servers, not iis
  13. Fromt the php.net docs Caution If you are using $_SESSION (or $HTTP_SESSION_VARS), do not use session_register(), session_is_registered() and session_unregister().
  14. I think that PHP sessions and Firefox are about to drive me crazy. I was attempting to demonstrate how easy it is to use PHP sessions but my code doesn't work in Firefox. I have EXACTLY the same files on 2 different unix Apache servers, one with PHP4, one with PHP5. I have copied the same code to an IIS server with PHP 5 The example works with IE5.5, 6 and 7 and Opera 9 clients but for reasons that are beyond me does not work with Firefox or Mozilla clients. Yes, cookies are on in the Mozclients and I have tried restarting the Mozclients and tried several Moz clients. Please feel free to try the examples... PHP 4 on Apache http://staffweb.cms.gre.ac.uk/~mk05/session/index.php PHP5 on Apache http://stuweb.cms.gre.ac.uk/~mk05/session/index.php PHP5 on IIS http://cms-stu-iis.gre.ac.uk/mk05/session/index.php You can see the sources by appending .txt to the .php filenames on the Apache servers (e.g. index.php.txt). These are links not copies so you see exactly the same source. What you will observe is that $_SESSION stores literals but not variables. The thing that really gets me is why it refuses to work in Mox clients. This should be almost completely independent of the client. Puzzled - you bet ???
×
×
  • 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.