On 9/11/14 2:19 PM, "rosenberger@xxxxxxxxx" <rosenberger@xxxxxxxxx> wrote: >Am 11.09.2014 20:11, schrieb Gates, Jeff: >> I need to update my php code on an old site as my host is now using PHP >> 5.4.30 and my old code is using session_register which is has been >> removed >> from this version of PHP. I am a newbie so I hope you'll bear with me. >> >> First: the errors I'm getting: >> >> [11-Sep-2014 11:21:14 America/Denver] PHP Notice: Undefined variable: >> PHPSESSID in /home7/outtacon/public_html/dichotomy/intro.php on line 12 >> [11-Sep-2014 11:21:14 America/Denver] PHP Fatal error: Call to >> undefined >> function session_register() in >> /home7/outtacon/public_html/dichotomy/intro.php on line 14 >> >> >> >> >> Second, here the code for lines 12 to 14: >> >> ####phpinfo(); >> if (!$PHPSESSID) { >> ##register variables >> session_register("as_role"); >> session_register("as_name"); >> session_register("as_email"); >> session_register("as_reenteremail"); >> session_register("as_story"); >> ##print("setting up session"); >> } else if ((!$as_role) || (!$as_name) || (!$as_email) || >> (!$as_reenteremail) || (!$as_story)) { >> session_register("as_role"); >> session_register("as_name"); >> session_register("as_email"); >> session_register("as_reenteremail"); >> session_register("as_story"); >> ##print("setting up session 2"); >> } >> >> >> >> I am also getting some errors on other pages but they are similar. It's >> the session_register. >> >> Is there a way to substitute session_register for something else >> easily? >> (Wishful thinking.) > >Hello > >http://de2.php.net/manual/de/function.session-register.php > >here you can find some solutions > >write your own function session_register > >for backword use exits (all untested) > >if (!function_exists(session_register)) { >function session_register($key,$value) >{ >$_SESSION[$key] = $value; >} >} > >BR/Torsten Thanks, but since I don't have any experience with PHP, I think I must ask for a little hand-holding. Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php