There is a bug related to the xampp version, i.e., x86 or x64 bits.
"I have a system with x64 bit windows and I installed a xampp with php7, but it was x86. This was a reason for that error, apache fails.
Now I have separately installed apach2.4 (x64) and PHP7.0.1 which is working perfectly now."
Other reports of the same error: https://forum.imasters.com.br/topic/547112-erro-de-session-no-php-7/
Possible solution:
session.save_handler = files
session.save_path="C:\xampp\tmp"
session.use_strict_mode = 0
session.use_cookies = 1
session.use_only_cookies=0
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.referer_check =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
session.hash_bits_per_character = 5
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
A programmer said that there is an error in php.ini.
https://www.sitepoint.com/community/t/php-7-session-start-not-working/211635/4
In version 7.1.10 appears what ?
– Isac
The empty array, already in version 5 appears the array with "test"
– NameNotDisplay
Aqui ta funfano -> http://sandbox.onlinephpfunctions.com/code/8fd64022c78c90f8154b137aa4b719041eb98d38
– Francisco
There’s something wrong, how can it be
gabriel
was assignedteste
in the session?– MagicHat
@Magichat here ta giving
teste
kk– Francisco
@Francis I saw...
– MagicHat
I suggest you present images of the execution of both versions, preferably calling
phpinfo()
in order to be able to distinguish directly each.– Isac
Most of these errors is due the session is configured after the HTML Header. Puts all php calls before any HTML.
– denis