Postingan lainnya
session_start di php
Halo semuanya, mau tanya , ini kenapa bikin login seasson gak bisa muncul ya ? padahal udah ada session_start() , mau munculin $_SESSION ['dataid'] ga bisa
fungsi
index.php
error
Terima Kasih
3 Jawaban:
Coba check dulu sebelum di echo apakah Session-nya udah ter-set
if (isset($_SESSION['dataid'])){
echo $_SESSION['dataid'];
}
Kalau ga keluar berarti check lagi fungsi login
apakah memakai xampp terbaru gan, (PHP 7 ) coba cari file php.ini di xampp\php set use_only_cookies=1
semoga lancar..
Ada bug di xampp nya di PHP.INI Ini jawaban dari Bitnami Developer:
" we have been checking the configuration of XAMPP and we found that the issue is related to the use_only_cookies variable that you can find in the Session's section of the php.ini file. Apache will crash if the use_only_cookies variable in the Session's section is set to 0 and everything is fine if it's set to 1.
http://php.net/manual/en/session.configuration.php#ini.session.use-only-cookies
We also checked that the use_strict_mode should be set to 1.
https://wiki.php.net/rfc/strict_sessions http://php.net/manual/en/session.configuration.php#ini.session.use-strict-mode
We'll include those changes in the next version of XAMPP with PHP 7. We are building the installers with the version 7.0.2 and we'll release them as soon as possible. "