unexpectedly, I received the following error when logging into one of my sites:
Function call undefined session_register ()
After some research, I saw that session_register () is deprecated after PHP 5.4. I checked on the hosting control panel, and, of course, it says that the current version I'm running on is PHP 5.4.19. I suppose they just triggered an update, so this issue seemed to be due to blue.
I looked at a few stack overflow messages and looked at links to PHP documentation. From what I'm compiling, session_register () is deprecated and should be replaced instead of $ _SESSION.
The problem is that both of them are already displayed in my code. Here is the code in my index.php file:
53 <? if ($username) { 54 session_register("ADMIN"); 55 $_SESSION['ADMIN'] = $username; 56 ?>
So I was hoping just by deleting line 54 (the obsolete part), then it should work, however it is not. When I did this, he broke the code.
Based on other posts, I read HERE and HERE , they seem to say that the code I see on line 55 above does the trick by itself. So I'm a little confused why this didn't work. If someone tells me which code should I use, I would really appreciate it. The script developer does not actually offer support.
NOTE. Also, yes, there is session_start () called at the very top of the page.
source share