Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Signing out fails and errors

G'day guys,

I've only come across (so far maybe) this issue with the work around in place. The error is when I go to log out it shows the following:

Warning: session_destroy(): Session callback expects true/false return value in /home/USERNAME/public_html/support/scp/logout.php on line 30
Warning: session_destroy(): Session object destruction failed in /home/USERNAME/public_html/support/scp/logout.php on line 30
Warning: Cannot modify header information - headers already sent by (output started at /home/USERNAME/public_html/support/scp/logout.php:30) in /home/USERNAME/public_html/support/include/class.ostsession.php on line 100
Warning: Cannot modify header information - headers already sent by (output started at /home/USERNAME/public_html/support/scp/logout.php:30) in /home/USERNAME/public_html/support/include/class.http.php on line 62

Any ideas? I've obviously cleared my cache and done all the normal checks. It is reproducible on IE, Firefox and Chrome.


  • Hi sjswarts,

    Have you tried doing a clean install of OSTicket, and see if the problem persists in the new installation?

    Let me know.

    Best regards,
  • What do you have in /scp/logout.php line 30? my session_destroy() is simply that, with no callback. 

    Maybe you didn't upgrade fully?
  • G'day guys,

    I have checked the file integrity and I cannot see any differences between the v1.10, v1.10-develop and my installation. Weird.

    All that has changed is that I've implemented the fix for those error messages listed in my post previously. That is the only change to the original that I've done.
  • Check your php.ini for session settings, something is weird.
  • Sorry for the delay.

    Here is my php.ini nothing I can find that shows something wrong. Is it possibly similar to this issue with Drupal and PHP v7.X -

    ; cPanel-generated php ini directives, do not edit
    ; Manual editing of this file may result in unexpected behavior.
    ; To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
    ; For more information, read our documentation (

    allow_url_fopen = On
    allow_url_include = Off
    display_errors = On
    enable_dl = On
    file_uploads = On
    max_execution_time = 90
    max_input_time = -1
    max_input_vars = 1000
    memory_limit = 256M
    upload_max_filesize = 50M;
    auto_prepend_file = '/home/USERNAME/public_html/wordfence-waf.php'
  • G'day all,

    Just in case anyone else is suffering from this issue using PHP v7 checkout what the excellent dude over at Github did for me -

    Replaced (on mine) 220 - 222 with the below. Really only 221 - 222 needs to change

        function destroy($id){
    SessionData::objects()->filter(['session_id' => $id])->delete();
    return true;
  • No worries mate, not sure how you found that Issue, must have been bugging you!

    Updated the patch to include that change, and added returns for Memcache as well. 

  • Yep :)
    I kept checking back on the pull requests figuring someone would find it eventually.
    What would be neat would be if someone (like yourself) were to branch off osticket and implement all the pull requests. Some of them are really needed.

    Works for me mate. 
Sign In or Register to comment.