Fatal Error Call To Undefined Function Session_register In Xampp
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta fatal error call to undefined function session_register() in php Discuss the workings and policies of this site About Us Learn fatal error: call to undefined function session_unregister() more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us call to undefined function session_is_registered() fix Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like
Session_is_registered() Is Deprecated
you, helping each other. Join them; it only takes a minute: Sign up Fatal error: Call to undefined function session_register() up vote 5 down vote favorite 1 session_register("username"); // session checker for pages $_SESSION['username']= $username; // storing username in session i am doing a php login system but when i click login system i go this error if session_is_registered myusername Fatal error: Call to undefined function session_register() in C:\xampp\htdocs\loginscript\auth_check.php on line 24 i am using php5.3 how can i solve this problems php mysql share|improve this question edited Dec 16 '13 at 20:25 Fred -ii- 69.4k93973 asked Dec 16 '13 at 19:53 brianc 51226 add a comment| 3 Answers 3 active oldest votes up vote 12 down vote This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0. Ref: http://www.php.net/manual/en/function.session-register.php Dont use session_register(), session_is_registered() and session_unregister() You can use $_SESSION[] instead of that Like as mentioned below: $_SESSION['username']= "Your value"; share|improve this answer edited Jun 16 at 10:34 answered Dec 16 '13 at 19:55 Krish R 16.4k42147 1 thanks for quick reply so how can i solve the problem. i am a beginner of php @user876345 thanks! –brianc Dec 16 '13 at 20:01 Remove that function and use $_SESSION[] –Krish R Dec 16 '13 at 20:04 add a comment| up vote 8 down vote Do not use session_register("myusername"); instead use $
Hello, Noob alert!! I tried to protect some pages with a code I found googling. But since my server was recently moved session_is_registered not working to a better one, the code stoped working and gives me
Session_register In Php W3schools
the error "Fatal error: Call to undefined function session_is_registered() .../protect_page.php on line 3" I googled it,
Session_register W3schools
and I think it's happening because of the version of PHP. I tried to fix it, but no joy! I would appreciate if you could help me! http://stackoverflow.com/questions/20619704/fatal-error-call-to-undefined-function-session-register I will paste here the code I have. the code I got on every page I wish to protect include('protect_page.php')?> login.php