Skip to content

When PHP Session is set to autostart, an error can be reported as Cacti attempts to start it #3815

Closed

Description

@eschoeller

I had previously upgraded from 1.2.9 to 1.2.11. Then I backed out. Now I've upgraded to 1.2.14. I'm getting a lot of these errors now:

2020-09-21 23:03:40 - ERROR PHP : A session had already been started - ignoring session_start() in file: /cacti/cacti-1.2.14-prod/lib/functions.php  on line: 5546
2020-09-21 23:03:40 - CMDPHP PHP ERROR NOTICE Backtrace:  (/graph_json.php[32]:include(), /include/auth.php[28]:require_once(), /include/global.php[439]:cacti_session_start(), /lib/functions.php[5546]:session_start(), CactiErrorHandler()

My php.ini :

date.timezone = America/Denver

; For Cacti spikekill
;memory_limit = 1024M      ; Maximum amount of memory a script may consume
memory_limit = 2048M      ; Maximum amount of memory a script may consume
max_execution_time = 90

; eric angry about files in /tmp
session.save_path = "/var/tmp/php_session_data"
;
; hide php version in http headers
expose_php = False

; 20190921 - schoelle - added to fix login problems for Cacti new install. 
; strange how this was missing for years and didn't really have problems?
[session]
session.auto_start=On

Cheers,

Activity

  1. netniV commented on Sep 23, 2020

    @netniV
    Member

    I don't know who recommended the session autostart in the PHP.INI but that is your problem. I never use that and it's not something we recommend.

  2. eschoeller commented on Sep 25, 2020

    @eschoeller
    Author

    I disabled the session autostart and the messages went away. So, that's good:) Maybe a check for that setting in the installer would be worthwhile. Dunno if it's worth the hassle though. I don't think it's on by default.

  3. changed the title [-]Ignoring session_start()[/-] [+]Issues with Cacti login when session_autostart is configured in php.ini[/+] on Sep 29, 2020
  4. added a commit that references this issue on Sep 29, 2020
  5. added this to the 1.2.15 milestone on Sep 29, 2020
  6. added and removed
    unverifiedSome days we don't have a clue
    on Sep 29, 2020
  7. TheWitness commented on Sep 29, 2020

    @TheWitness
    Member

    Fixed it.

  8. netniV commented on Oct 6, 2020

    @netniV
    Member

    Having autostart could conflict with the cookie options though, is that anything worth reporting on ?

  9. TheWitness commented on Oct 17, 2020

    @TheWitness
    Member

    Correct, and good point. We should open a feature request to block it.

  10. changed the title [-]Issues with Cacti login when session_autostart is configured in php.ini[/-] [+]When PHP Session is set to autostart, an error can be reported as Cacti attempts to start it[/+] on Nov 2, 2020
  11. locked and limited conversation to collaborators on Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourresolvedA fixed issue

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions