How to setup myDBR to not stop on Notices alerts?

(12 posts) (2 voices)

Tags:

No tags yet.

  1. marzon, Member

    Hi!

    I´m receiving a notice alert:

    Notice: A session had already been started - ignoring session_start() in /home/mzn/biskud/public_html/lib/utils.php on line 2622

    It´s just a Notice and myDBR is stoping!

    myDBR was not able to open a PHP session.

    Error message:

    Notice: A session had already been started - ignoring session_start() in /home/mzn/biskud/public_html/lib/utils.php on line 2622

    Could you please just check if Session is already started at utils.php on line 2622 before try to start a new one?

    Thanks!!

  2. myDBR Team, Key Master

    This is a problem with your setup. What happens is that myDBR is trying to open a session it needs, but in your configuration a session has already been opened somewhere else.

    What you need to do is configure your setup not to open a session before myDBR is run.

    --
    myDBR Team

  3. marzon, Member

    OK! Do you know how can I try to find what is opening a session before myDBR?

    THanks

  4. myDBR Team, Key Master

    With no knowledge of your setup it is hard to tell. You could create a simple PHP script and see if a session is already started when you run the script. This would indicate a autostart session configuration.

    --
    myDBR Team

  5. marzon, Member

    Hi!

    I´ve created this simple script:

    <?php

    if (isset($_SESSION)) {
    echo 'Already created';
    } else {
    echo 'no session';
    }

    ?>

    and it always returns 'Already created' even in a new window without cookies!

    So I´ve added this line to /etc/php-fpm.d/www.conf file:

    php_value[session.auto_start] = 0

    and then I´ve restarted php-fpm.

    Just after restart it is returning 'no session' but after 10 or 15 request, the 'Already created' is show again and again.

    I don´t know where to search any more...

    Thanks

    PS.: I´ve added a var_dump($_SESSION) and it is always empty.

  6. myDBR Team, Key Master

    You might want to post a question to StackOverflow how to configure your nginx / php-fpm.

    --
    myDBR Team

  7. marzon, Member

    Hi!

    Could you please change the Utils.php to not stop/break/crash on a Notice error?

    Or just check is the session is already created.

    Thank you very much!

    Marzon

  8. myDBR Team, Key Master

    Suppressing the error message will not solve the actual problem.

    In order to operate properly, myDBR should be handling the sessions. Now that in your setup sessions are created automatically, it prevents myDBR session handling. You should fix the setup.

    --
    myDBR Team

  9. marzon, Member

    OK. You´re right. But we are talking about Notice messages!

    Just do not break/stop/crash on notice messages. Its the only thing I´m asking about.

  10. myDBR Team, Key Master

    What specific notice messages are you talking about?

    --
    myDBR Team

  11. marzon, Member

    This one:

    myDBR was not able to open a PHP session.

    Error message:

    Notice: A session had already been started - ignoring session_start() in /home/mzn/biskud/public_html/lib/utils.php on line 2622

    Its just a notice, so I guess that you could ignore it. OK?

    Thanks!

  12. myDBR Team, Key Master

    No, that is an error.

    As said, In order to operate properly, myDBR needs to be able to be handle the sessions. In your setup sessions are created automatically, it prevents myDBR session handling. You should fix the setup.

    --
    myDBR Team


Reply

You must log in to post.