PHP session does not work after hosting my site

Before hosting my site, the session still works using only the localhost and the IP address, but after hosting it, the session is not working anymore. Anyone who can help me?

What do you mean by “the session”? Are you using a script or did you write your code yourself?

I am referring to the PHP session.

Like this one.

$_SESSION['userid'] = $userid;

It does not set the session.

I have tried php_flag output_buffering on on my .htaccess file but still won’t work.

Can you try turning “Show Errors” on in your website panel, under settings then general? Maybe that will help you find issues with the code, since I don’t know PHP (sorry). If that doesn’t help, maybe @ckhawand can help you.

Did you start those two guys in the first place?

session_start();
ob_start();

aaaand do you have your tmp folder?

Yes I do have my tmp folder

Yes I have the session_start(); and ob_start();

Make sure the extension is .php :smile: