Set session variables

Hi all!

I want to set $_SESSION variable in my script what working with rest api of Sugar on one server.

But after reload sugar page, i see that $_SESSION i cleanup without my variable. How i can do that?

Parents Reply
  • Hi Alex,

    In your rest api call, are you sure that you are making the settings after starting the session?

    I've just tried on 7.6.2.1 ENT. (I don't know your sugar version), using following code i was able to write something to session using rest api then i read/use it from sugar UI.

    session_start();
    $_SESSION['tevfik'] = 'OK';
    

    You must be missing something.  My guess is you forgot to start session.

    I hope it helps.

    Best Regards

    Tevfik Tümer

    Developer Support Engineer

Children