Jump to content

Deprecated: Function session_is_registered() is deprecated in....


jimweldon

Recommended Posts

 

Hi,

 

My host upgrade PHP yesterday and broke some code on my site. My developer is not avail...

 

 

ERROR MSSG:

 

Deprecated: Function session_is_registered() is deprecated in...followed by directory

 

Here's the live of code that contains the error.

 

if(!isset($_POST[$param_name]) && !isset($_GET[$param_name]) && session_is_registered($param_name))

 

 

 

Im assuming it has to do with "session_is_registered". Any ideas? Thx.

Link to comment
Share on other sites

I need to modernize the code. Any ideas. thx.

 

 

}

 

function set_session($param_name, $param_value)

{

  if(session_is_registered($param_name))

    session_unregister($param_name);

  $_SESSION[$param_name] = $param_value;

  session_register($param_name);

}

 

Link to comment
Share on other sites

  • 2 years later...

This morning I opened my site to find this at the top of the page:

 

 

Deprecated: Function session_is_registered() is deprecated in /home/trafficr/public_html/config.php on line 37

 

Deprecated: Function session_register() is deprecated in /home/trafficr/public_html/members/index.php on line 9

 

I tried replacing session_is_registered with $_SESSION but that completely broke the site. I am not sure what to do. I am not a php coder and know nothing about it. This is a traffic exchange that has a lot of members, so I want to fix it as quickly as possible.

 

Any ideas?

Link to comment
Share on other sites

This morning I opened my site to find this at the top of the page:

 

 

Deprecated: Function session_is_registered() is deprecated in /home/trafficr/public_html/config.php on line 37

 

Deprecated: Function session_register() is deprecated in /home/trafficr/public_html/members/index.php on line 9

 

I tried replacing session_is_registered with $_SESSION but that completely broke the site. I am not sure what to do. I am not a php coder and know nothing about it. This is a traffic exchange that has a lot of members, so I want to fix it as quickly as possible.

 

Any ideas?

 

 

Try replacing function session_is_registered() with:

 

 

if(isset($_SESSION[''])){
}

// replace whatever is in the (*) on the original inside the ['*'] on the new

as well, replace function session_register() with this line:

$_SESSION['*'] = $_REQUEST['*'}

// Replace the asterisks with what was in the parentheses in the original
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.