• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Session

New Here ,
Apr 09, 2021 Apr 09, 2021

Copy link to clipboard

Copied

Session not working in IIS or WAMP using PHP, MySQL, Webassist and Dreamweaver on localhost .  All pages were developer months ago and are working on GoDaddy server.  All five websites are no-longer recording the data from Store Result.  Evenwrote a test page. Get this message "
Notice: Undefined variable: ok in C:\wampserver64\www\lccc\A_SESSION TEST.php on line 12
session FAILED".  Been trying to selove for a month.  Can anyone help. [personal info removed by moderator]

 

<?php
session_start();
?>
<!doctype html>
<html >
<head>
<meta charset="UTF-8">
<title>Test</title>
</head>
<body>
<?php
echo $ok ? 'session OK' : 'session FAILED';
?>
</body>
</html>

TOPICS
Code

Views

107

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 09, 2021 Apr 09, 2021

Copy link to clipboard

Copied

Where are you getting the $ok variable from? The error is saying the variable $ok can't be found as its not been set in the code available and therefore cant check if a session is active so its returning failed.

 

You're usually checking a condition like:

 

$ok = 20;
echo $ok > 10 ? 'session OK' : 'session FAILED';

 

But I dont know what the variable $ok is?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 09, 2021 Apr 09, 2021

Copy link to clipboard

Copied

Which version of PHP is installed on your local server?

Which version of PHP is installed on GoDaddy's server?

 

 

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Test</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<?php phpinfo() ?>
</body>
</html>

 

 

Ideally both server's should be using the same set-up.

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 09, 2021 Apr 09, 2021

Copy link to clipboard

Copied

LATEST

Could you give us a link to one of the 5 websites so that we can see what is going on.

Wappler, the only real Dreamweaver alternative.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines