Revolt51 Posted March 4, 2012 Share Posted March 4, 2012 I'm making a mafia game ¬_¬, and i get this error on the login page - Deprecated: Function session_register() is deprecated in /home/therealh/public_html/index.php on line 105 Could anybody shed some light please? Quote Link to comment Share on other sites More sharing options...
prototype Posted March 4, 2012 Share Posted March 4, 2012 session_register(), session_is_registered() and session_unregister() are dependent on register_globals. Register_globals were turned off starting in php4.2 in the year 2002. No new code should have been written after that point in time that used these functions. These functions have been removed in php6. Any code using them will stop working under php6 and must be changed to use the $_SESSION array variables. Quote Link to comment Share on other sites More sharing options...
Revolt51 Posted March 4, 2012 Author Share Posted March 4, 2012 So what do i need to change? Thanks Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted March 4, 2012 Share Posted March 4, 2012 Prototype stated what needs changing in his reply. Quote Link to comment Share on other sites More sharing options...
sniko Posted March 4, 2012 Share Posted March 4, 2012 $something = <value>; session_register("something"); -to- $_SESSION['something'] = <value>; Quote Link to comment Share on other sites More sharing options...
Revolt51 Posted March 4, 2012 Author Share Posted March 4, 2012 Yeah but im confused Could someone edit it quickly so i can understand a bit better please? session_register('username'); $_SESSION['username'] = $inf->username; Quote Link to comment Share on other sites More sharing options...
bluegman991 Posted March 4, 2012 Share Posted March 4, 2012 Lol php6 doesn't exist yet. These functions were completely remove in php 5.4 Which was released 3 days ago. Quote Link to comment Share on other sites More sharing options...
Revolt51 Posted March 4, 2012 Author Share Posted March 4, 2012 is there no other way to get around it because i remove the session_register("something"); and have the $_SESSION['username'] = $inf->username; left and then when i log in i just get a white screen Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 4, 2012 Share Posted March 4, 2012 post your code people cant help you if they have to guess what your seeing. Quote Link to comment Share on other sites More sharing options...
sniko Posted March 4, 2012 Share Posted March 4, 2012 <?php session_start(); //some code $_SESSION['username'] = $inf->username; ?> I don't see why that wouldn't work... ? Make sure you have no syntax errors within the code Quote Link to comment Share on other sites More sharing options...
Revolt51 Posted March 5, 2012 Author Share Posted March 5, 2012 I have changed that but now when you login it either brings up a white screen or the terms and conditions Quote Link to comment Share on other sites More sharing options...
sniko Posted March 6, 2012 Share Posted March 6, 2012 Run me through the process.... Login > TOS - or - Login > White Screen - or - White Screen Quote Link to comment Share on other sites More sharing options...
Revolt51 Posted March 6, 2012 Author Share Posted March 6, 2012 You login then either the TOS comes up and you cannot do anything unless you retype the original URL and login again 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.