Php 5.4 Fatal Error Call To Undefined Function Session_register
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the fatal error: call to undefined function session_unregister() company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions call to undefined function session_is_registered() fix Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million fatal error call to undefined function session_register() in xampp programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Fatal error: Call to undefined function session_register() [duplicate] up vote 0 down vote favorite This question already has an answer
Session_is_registered() Is Deprecated
here: PHP/MySQL login 2 answers I'm new to php and was wondering if anyone could help me debug, the following error. Fatal error: Call to undefined function session_register() It occurs as I get a user to login. PHP Error it throws out at line 16 is $active=$row['active']; php share|improve this question asked Mar 2 '13 at 20:50 Sam 1312314 marked as duplicate by mario, cryptic ツ, Ocramius, tereško, Graviton Mar 5 '13 at 1:56 This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. 5 The function is no longer present in PHP 5.4 –Pekka 웃 Mar 2 '13 at 20:52 It's almost funny that on one line it does session_register and on the very next one it goes on to access $_SESSION directly. –Jon Mar 2 '13 at 20:55 See this SO answer –deepmax Mar 2 '13 at 20:56 add a comment| 2 Answers 2 active oldest votes up vote 3 down vote If you check the php manual, you will see that it has been deprecated How about you use the $_SESSION variable? $_SESSION["myusername"] = $username; share|improve this answer edited May 18 '14 at 21:21 Benjamin 11.4k1693172 answered Mar 2 '13 at 20:54 Ibu 24k64272 add a comment| up vote 2 down vote First you only select id from databas
here for a quick overview of the site Help Center Detailed answers session_is_registered not working to any questions you might have Meta Discuss the
Session_register W3schools
workings and policies of this site About Us Learn more about Stack Overflow the company
Php Session_register Replacement
Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the http://stackoverflow.com/questions/15179308/fatal-error-call-to-undefined-function-session-register Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up PHP Fatal error: Call to undefined function session_register() up vote 6 down vote favorite I have moved my site from php 5.3 to http://stackoverflow.com/questions/20661991/php-fatal-error-call-to-undefined-function-session-register 5.4 and now I cannot login to site admin I see this error: PHP Fatal error: Call to undefined function session_register() in /home/regimhot/public_html/webmotionsV4/mvc/models/kit_model_useri.php on line 18 The code with the problem is: function login($username, $password) { if(!$username || !$password) return false; if($this->useri[$username]['password']==$password) { session_register('userInfo'); $_SESSION['userInfo'] = $this->useri[$username]; $_SESSION['userInfo']['logat'] = true; $this->userInfo = &$_SESSION['userInfo']; How can I solve the problem? i know that the function session_register is not suported by php 5.4 php share|improve this question asked Dec 18 '13 at 15:24 AndreiG. 35115 no need of writing session_register('userInfo') line –Yatin Trivedi Dec 18 '13 at 15:26 add a comment| 2 Answers 2 active oldest votes up vote 16 down vote accepted This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0. http://www.php.net/manual/en/function.session-register.php Make sure you have session_start(), as just removing session_register() and relying on the $_SESSION assignment won't work. share|
Hello, Noob alert!! I tried to protect some pages with a code https://www.daniweb.com/programming/web-development/threads/464412/fatal-error-call-to-undefined-function-session-is-registered I found googling. But since my server was recently moved to a better one, the code stoped working and gives me the https://pkp.sfu.ca/bugzilla/show_bug.cgi?id=7544 error "Fatal error: Call to undefined function session_is_registered() .../protect_page.php on line 3" I googled it, and I think it's happening because of call to the version of PHP. I tried to fix it, but no joy! I would appreciate if you could help me! 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 call to undefined