I'm working through getting Cacti running properly on my system.
I seem to be seeing some issues related to HTTP sessions (at least I believe the messages are referring to HTTP sessions). My logs have many entries like:
2022-12-27 14:12:48 - CMDPHP PHP ERROR NOTICE Backtrace: (/clog.php[27]:include(), /include/auth.php[27]:require_once(), /include/global.php[450]:cacti_session_start(), /lib/functions.php[6831]:session_start(), CactiErrorHandler())
2022-12-27 14:12:48 - ERROR PHP : session_start(): Ignoring session_start() because a session is already active in file: /usr/local/share/cacti/lib/functions.php on line: 6831
2022-12-27 14:12:48 - CMDPHP PHP ERROR WARNING Backtrace: (/clog.php[27]:include(), /include/auth.php[27]:require_once(), /include/global.php[450]:cacti_session_start(), /lib/functions.php[6823]:session_name(), CactiErrorHandler())
2022-12-27 14:12:48 - ERROR PHP : session_name(): Session name cannot be changed when a session is active in file: /usr/local/share/cacti/lib/functions.php on line: 6823
2022-12-27 14:12:48 - CMDPHP PHP ERROR WARNING Backtrace: (/clog.php[27]:include(), /include/auth.php[27]:require_once(), /include/global.php[403]:ini_set(), CactiErrorHandler())
2022-12-27 14:12:48 - ERROR PHP : ini_set(): Session ini settings cannot be changed when a session is active in file: /usr/local/share/cacti/include/global.php on line: 403
2022-12-27 14:12:48 - CMDPHP PHP ERROR WARNING Backtrace: (/clog.php[27]:include(), /include/auth.php[27]:require_once(), /include/global.php[402]:ini_set(), CactiErrorHandler())
2022-12-27 14:12:48 - ERROR PHP : ini_set(): Session ini settings cannot be changed when a session is active in file: /usr/local/share/cacti/include/global.php on line: 402
2022-12-27 14:12:48 - CMDPHP PHP ERROR WARNING Backtrace: (/clog.php[27]:include(), /include/auth.php[27]:require_once(), /include/global.php[401]:ini_set(), CactiErrorHandler())
2022-12-27 14:12:48 - ERROR PHP : ini_set(): Session ini settings cannot be changed when a session is active in file: /usr/local/share/cacti/include/global.php on line: 401
I also find that the /tmp dir (where the session files are going because the system seemed to want to write to a non-writable location) if filled with many session "sess_*" files.
I've tried various things based on searching old forum posts but this doesn't seem to match the symptoms of those problems exactly.
Any advice on tracking this down?
Many Thanks
Post Installation errors FreeBSD
Moderators: Developers, Moderators
Re: Post Installation errors FreeBSD
First you don't state what version of Cacti.
The first thing I would check though is that session.auto_start = 0 in your php.ini. Cacti does not support that setting be turned on. I believe you can also set the session path in the ini file also.
The first thing I would check though is that session.auto_start = 0 in your php.ini. Cacti does not support that setting be turned on. I believe you can also set the session path in the ini file also.
Re: Post Installation errors FreeBSD
Thank you for your response.
The version is 1.2.22. I've ensured 'session.auto_start = 0' is in the php.ini file.
On and off, I've been unable to log in. I suspect that this is really a session issue though.
I understand from a comment associated with an old posting that sometimes session issues are related to permission to write some directory (I assumed it was the session directory but maybe I'm wrong). It appears to me that there are two login id surrounding a cacti installation: the user the poller runs as and the user the website runs as. The prior post didn't mention the directory and/or which user needed permission. Is that documented anywhere?
Thanks,
Rob
The version is 1.2.22. I've ensured 'session.auto_start = 0' is in the php.ini file.
On and off, I've been unable to log in. I suspect that this is really a session issue though.
I understand from a comment associated with an old posting that sometimes session issues are related to permission to write some directory (I assumed it was the session directory but maybe I'm wrong). It appears to me that there are two login id surrounding a cacti installation: the user the poller runs as and the user the website runs as. The prior post didn't mention the directory and/or which user needed permission. Is that documented anywhere?
Thanks,
Rob
Re: Post Installation errors FreeBSD
Every system/distro is different, so there is no documentation from us about what user the website runs at (or the poller). Some people run the website as a user called cacti, others nginx, others apache, etc... Poller is typically ran as root but can also be ran as pretty much any user.
The session is also all up to the distro, as its usually set in php.ini, Cacti doesn't have anything to do with what directory the sessions are written into.
If you have
$cacti_db_session = true;
in your include/config.php
then it doesn't even write into a directory, it uses the DB, so there are no permission issues.
The session is also all up to the distro, as its usually set in php.ini, Cacti doesn't have anything to do with what directory the sessions are written into.
If you have
$cacti_db_session = true;
in your include/config.php
then it doesn't even write into a directory, it uses the DB, so there are no permission issues.
Re: Post Installation errors FreeBSD
That sounds like a wise idea. I'm going to try now.
I'm also interested in converting to nginx rather than Apache. I'm trying to run this all off a Raspberry PI 4B for my home network and Apache seems way to resource hungry.
Thanks for the advice!
Rob
I'm also interested in converting to nginx rather than Apache. I'm trying to run this all off a Raspberry PI 4B for my home network and Apache seems way to resource hungry.
Thanks for the advice!
Rob
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Post Installation errors FreeBSD
After you update your php settings, it's always wise to restart apache/nginx/php-fpm. Also note that several distributions based upon Debian have two phpX.ini files.
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Re: Post Installation errors FreeBSD
Thank you! I'll keep that in mind too.
Who is online
Users browsing this forum: No registered users and 2 guests