Solved Postfixadmin and FreeBSD 13.2 Issue with common.php

OK I have muddled through getting postfixadmin installed. but I am getting the following error relative to sessions and common.php

Warning: session_name(): Session name cannot be changed when a session is active in /usr/local/www/postfixadmin/common.php on line 24
Notice
: session_start(): Ignoring session_start() because a session is already active in /usr/local/www/postfixadmin/common.php on line 25

This appears to be a know problem in SourceForge. and the the application is working so I am currently adding it to my list of warning to deal with one I get major system bugs taken care of unless someone suggest otherwise

oh impacted lines in common.php are




Code:
session_cache_limiter('nocache');
session_name('postfixadmin_session');<
 
1. The Notice can obviously be ignored. It's not a warning, so no need to worry about it.
2. The Warning looks like an internal issue, maybe some unclean code that executes functionally correctly. It seems you can safely ignore it.

Normally this should not be shown in the GUI, so in your shoes I would simply set display_errors = off in php.ini and not worry about it.
 
Little worried about this because you mentioned SourceForge. On Github, which was updated last week, the file in question hasn't been modified in a year and the lines that your error is referencing start on line 35 instead of line 25. Might need to switch your sources for that program.
 
my.cnf is for MySQL, configuration for PHP will be in /usr/local/etc/php.ini. You get a development & production sample file by default and usually have to create the actual php.ini file. Can't remember whether auto_start is on by default if you don't create one but you can find out -

Create a php file in the same directory as the postfixadmin web application containing the following -
Code:
<?php phpinfo();

Opening that php file in a web browser should show the entire PHP configuration and which settings are on/off.
 
OK I had to sort out which php.ini is being used... the phpinfo() shows autostart is on. When I pulled the string it turns out PHP was using the my.cnf from /usr/local/etc/mysql not the one from /usr/local/etc/[/FILE}. I have turned auto_start off
 
I didn't quite understand how this port worked since I couldn't locate the tarballs it was using, but looking up USE_GITHUB helped

This port is pegged to https://github.com/postfixadmin/postfixadmin/commit/d3bc15514842410783c18d57c04d03cce31f5fa8

Despite the port being updated 8 months ago, the target source is two years ago for a release version that doesn't exist (which is probably a problem for whoever did this, since they'd have to go back in time or fabricate another new version tag). For PHP projects, this is an eternity.

Turns out "whoever did this" solved the problem in another way: You should probably install mail/postfixadmin33. That version is only one year old. Eventually, a new version for port maintainers to pick up should be arriving soon.

Either way, if you think you've solved your problem 🤷‍♀️
 
That was the port I installed..... Since I have been updating an out of date site there are bound to be some issues.. As I mentioned issue was using wrong php.ini. Once brought to correct version also is good.
 
Back
Top