roldahayes Posted June 24, 2014 Share Posted June 24, 2014 Hi, I have upgraded my server from PHP 5.3.3 to version 5.5 and I'm now having a few problems with some code. This line gives a fatal error of: Call to undefined function session_is_registered() if (session_is_registered("isAuthenticated") && ($_SESSION ['isAuthenticated'] = "loggedIn")) It appears this is depreciated? How can I solve this? Quote Link to comment Share on other sites More sharing options...
Jacques1 Posted June 24, 2014 Share Posted June 24, 2014 The manual knows. Quote Link to comment Share on other sites More sharing options...
Solution ginerjm Posted June 24, 2014 Solution Share Posted June 24, 2014 Now that you know that function has been DEPRECATED (as in gone, not 'reduced in value'), the answer to your question is simply to use if (isset($_SESSION['isAuthenticated']) && ($_SESSION ['isAuthenticated'] = "loggedIn")) NOTE - I left the error in your code in my sample. You have only one = sign in your compare - you need two. Quote Link to comment Share on other sites More sharing options...
roldahayes Posted June 24, 2014 Author Share Posted June 24, 2014 Thanks, would fixing that line be causing this one to fail? if (!session_register("isAuthenticated")) Quote Link to comment Share on other sites More sharing options...
ginerjm Posted June 24, 2014 Share Posted June 24, 2014 One would think from the previous difficulty that you would have done some research on your own and RTFM for that function as well. Quote Link to comment Share on other sites More sharing options...
Jacques1 Posted June 24, 2014 Share Posted June 24, 2014 No offense, but it might be a good idea to leave this task to somebody else. Sessions are highly sensitive, because they're used for authentication and access control. If you don't know what you're doing and screw this up, you can get everybody into serious trouble. Quote Link to comment Share on other sites More sharing options...
roldahayes Posted June 24, 2014 Author Share Posted June 24, 2014 Thanks for the help. I've solved all the errors now . Thanks for pointing me in the right direction. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.