$_SESSION doesn't work

index.php
<!doctype html>

test <? session_start(); $_SESSION['test'] = 't123e456s789t'; echo '--'.$_SESSION['test'].'=index='; ?>

and test.php

<? session_start(); echo "--".$_SESSION['test']."=TEST="; ?>

More than 3 weeks does not work on your resource. To verify, I created an account on https://byet.host/ and it works correctly on the resource. The same version of PHP is used on both resources.
What’s wrong?

Hi @donetsk!

  1. Short PHP tags <? / ?> have been deprecated. Please replace them with normal ones <?php / ?> or read this topic to add support for them.

  2. Please open .htaccess and append to a new line the following code:

php_flag output_buffering on

I have added

[quote=“NGiNX, post:2, topic:78040”]
php_flag output_buffering on
[/quote] to .htaccess
Now it works. Thanks!