Support » Plugin: mb.miniAudioPlayer - an HTML5 audio player for your mp3 files » mb.miniAudioPlayer overwriting user session created by NinjaFirewall

  • Resolved wp_kc

    (@wp_kc)


    mb.miniAudioPlayer and NinjaFirewall used to work fine together until a few days ago.

    Now NinjaFirewall says that the user session created by it is getting destroyed. Disabling plugins one-by-one proved that mb.miniAudioPlayer is the plugin causing the problem.

    The developer of NinjaFirewall says your plugin is probably creating a new user session without first checking to see if one has already been started. In case you are unfamiliar with NinjaFirewall, it uses the “auto_prepend_file” directive to start it’s firewall code before any other PHP files get loaded. So maybe you need code like this…

    
    if(empty(session_id()) session_start();
    

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author pupunzi

    (@pupunzi)

    Hi,
    The new session is created with all the controls to check if it was already created:

    
        if (version_compare(phpversion(), '5.4.0', '<')) {
            if (session_id() == '')
                session_start();
        } else {
            if (session_status() == PHP_SESSION_NONE)
                session_start();
        }
    
    Plugin Author pupunzi

    (@pupunzi)

    With the last 1.8.10 update the session_write_close(); has been removed

    Wow! Fast service! You are awesome.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘mb.miniAudioPlayer overwriting user session created by NinjaFirewall’ is closed to new replies.