Mam ciągle problem z sesjami.
Chciałem przetestować kawałek kodu na zewnętrznym serwerze, który ma takie ustawienia:
session
Session Support enabled
Registered save handlers files user
Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path /tmp /tmp
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid Off Off
I kiedy wywołam tylko kod:
<?php ?> <html> <body> <?php ?> </body> </html>
to otrzymuję coś takiego:
Warning: session_start(): open(/tmp/sess_0e2f7f3af134e8883ec1ee2cfbb32d96, O_RDWR) failed: No such file or directory (2) in /!test2/index2.php on line 2
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /!test2/index2.php:2) in /!test2/index2.php on line 2
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /!test2/index2.php:2) in /!test2/index2.php on line 2
rozpoczynam sesję
Warning: Unknown(): open(/tmp/sess_0e2f7f3af134e8883ec1ee2cfbb32d96, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0

Proszę o pomoc