Please help: session variable
| From: | ITSC) | Date: | Tue, 23 Jun 2020 02:48:55 +0000 |
| Subject: | Please help: session variable | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-327194@lists.php.net to get a copy of this message | ||
Hi all,
I'm newbie to PHP and working on migration of some PHP codes written by others to new server.
The main PHP script has some session variables defined. However, after displaying a template:
$smarty->display('show_form.tpl');
all session variables are gone:
- session_status shows session is active
- session_id shows the correct session id
- /var/lib/php/session/sess_xxx file becomes empty after submitting the form in the template.
The template is a simply form looks like following:
<form name=myForm onSubmit="return validatePwd()" method="POST"
action="{$smarty.server.PHP_SELF} ">
session_start() is called at the very beginning of the main PHP script.
Besides sessions variables, all variable defined are also lost, eg.
$b1 = $_SESSION['logined'];
We're using PHP 7.2.24 bundled with CentOS8 and using Smarty 2.6.30, though seems not Smarty
related issue.
Would anyone please help?
Thanks a lot.
/ST Wong