PHP Fatal error Call to undefined function session_register()

PHP Fatal error : Call to undefined function session_register()

You get the following error after either upgrading PHP 5.3 or older version to 5.4 or above.

php fatal error call to undefined function session_register()

 

This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.

 

The work around is to either downgrade PHP to 5.3 or try updating the code to following:

$_SESSION['myusername']="something";

If you are running cPanel/WHM you can recompile the PHP using EasyApache with deprecated version of 5.3.

Incoming search terms: PHP Fatal Error, Session_register, call to undefined function

session_register() accepts a variable number of arguments, any of which can be either a string holding the name of a variable or an array consisting of variable names or other arrays. For each name,session_register() registers the global variable with that name in the current session.

Add a Comment