Notes on installing Maia on CentOS 7 Plesk 12.5

Wasn’t clear to me that Maia is a fork of amavisd-new, so you don’t need amavis? No clear instructions for installing 1.0.4, but found this install script to look at:

Basically pick a set of directions and adapt them to work in the specific environment of the system. The two config tests and are helpful (required) to figure out what’s missing. But also look at the server logs as the config test will say it’s happy when in fact things aren’t right.

To fix the open_basedir issues I ended up with:


There’s a lot of packages that have to be added (using pear). This one though didn’t come up as needed but it is:

pear install PEAR_Info

Also: listPackages() and listAllPackages() return different types (I used these to check the config). listPackages() works as expected when the .php file is called from the command line, but it returns null when apache runs it. ini_get(“include_path”); indicates the include paths are the same between command line and apache. Only hint is that when run from the command line it’s not finding ../config.php (which is in the maia dir). That’s explained by different environment variables…$_SERVER[‘DOCUMENT_ROOT’]. Changing that for testing that doesn’t provide any more info as to why it works from command line and not from apache.

Looks like under apache is wants to look here: /usr/share/pear/ for confg files, but from the command like it looks here (and this is where they are): /var/lib/pear/

Why does apache not know where to look?

specifically apache is looking for (from getRegistry() ):

: statedir :/usr/share/pear/.registry
: filemap :/usr/share/pear/.filemap
: channelsdir :/usr/share/pear/.channels
: lockfile :/usr/share/pear/.lock

but that’s not where those files are.

gave up and did the obvious

ln -s /var/lib/pear/.registry .registry
ln -s /var/lib/pear/.filemap .filemap
ln -s /var/lib/pear/.channels .channels
ln -s /var/lib/pear/.lock .lock

and didn’t work as open_basedir restrictions don’t include those. Slog through the errors and add them and finally it’s all green…except there’s still errors getting logged. Rinse & repeat…

Trying the login page, a bunch of errors, but some can probably be ignored. But this one:

AH01071: Got error 'PHP message: PHP Fatal error:  Call to undefined function: MDB2_Driver_mysql::raiseError(). in /usr/share/pear/MDB2.php on line 1936\n'

is fatal, though I suspect I need to chase what got it to that line and not the missing function. Worry that maiamailguard is just too old/out of date and the problems will never stop…

more odd things to do:

pear upgrade MDB2-beta

minimal .php program to figure out the environment

<?php phpinfo();?>

in smarty.php had to change this:

    if (isset($smarty_path)) {
      ini_set('include_path', $smarty_path . ":" . ini_get('include_path'));
      require_once ("Smarty.class.php");
    } else {
      require_once ("Smarty/Smarty.class.php");

Change Smarty -> smarty.


Sunday, October 23rd, 2016 Linux