close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Who said "almost doesn't count"

Thread began 9/08/2009 10:22 pm by james276087 | Last modified 9/19/2009 11:44 am by james276087 | 5412 views | 14 replies

Jason ByrnesWebAssist

It looks like there is a problem with session management on your server. The session Contents are being cleared each time a pge is loaded.


To Test this, I created the following file on your server:
sessionTest.php

This file has the following code:

php:
<?php

if (!session_id()) session_start();
if ((isset(
$_GET['test']) && $_GET['test'] != ""))     {
  
$_SESSION["test"] = "test";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
To Test you servers session management:
<p>1) <a href="<?php echo((isset($_SERVER["PHP_SELF"]))?$_SERVER["PHP_SELF"]:""?>?test=test">Click here to Set Session variables</a></p>
<p>The link above uses a URL variable to trigger setting a session variable</p>
<p>2) <a href="<?php echo((isset($_SERVER["PHP_SELF"]))?$_SERVER["PHP_SELF"]:""?>">Click here to test session variables</a></p>
<p>This link does not contain the URL variable, so it will not set the session variable again, but the session variables value should not be changed.</p>
<p>Session Test = <?php echo isset($_SESSION['test'])?$_SESSION['test']:"NULL"?> <br />(When the page is first loaded, the session variable test will = NULL, when you click the first link, the session variable test will be set to test. Clicking the second link will only reload the page, the session variable test should still equal test, if it equals NULL, your server has a problem with session management.</p>
<p>Session ID = <?php echo session_id(); ?> <br />(NOTE: if sessions are working correctly, the session ID should not change.)</p>
</body>
</html>




Clicking the first link on the page properly sets the session variable. The second links just reloads the page, but the session variable is cleared.

You should contact your host to have them look into the session management issue.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...