-1

Fatal error: Call to undefined function session_register() in /home/bakewell/public_html/inventory/config.inc.php on line 36

this use to work good as of yesterday don't know what happen today. i try check back the code. did not see anything wrong

please help

1 Answers1

0

What version of PHP do You have? According to documentation: http://www.php.net/manual/en/function.session-register.php

That function is removed since PHP 5.4.0

szymanskilukasz
  • 463
  • 3
  • 13
  • i am using version 5.4 – user3794717 Jul 01 '14 at 16:57
  • So this is the reason. From documentation: "Warning This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0." Instead of session_register use $_SESSION – szymanskilukasz Jul 01 '14 at 17:00
  • Fatal error: Function name must be a string in /home/bakewell/public_html/inventory/config.inc.php on line 36 – user3794717 Jul 01 '14 at 17:05
  • include("mysql.inc.php"); include("common.inc.php"); define("DBHOST", "localhost"); define("DBNAME", "stock"); define("DBUSER", "zar"); define("DBPASSWORD", "zar"); define("SS", "NACIN"); session_start(); $_SESSION (SS); DBLogOn(); – user3794717 Jul 01 '14 at 17:05
  • If You want to store something in $_SESSION you must assign it like $_SESSION['key'] = $value Please read at least documentation. I answered Your question. Want to know how to use $_SESSION? Read the docs. – szymanskilukasz Jul 01 '14 at 17:12