Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Make a list of all required PHP modules #89

Open
StoppingBuck opened this issue Jul 17, 2020 · 10 comments
Open

Make a list of all required PHP modules #89

StoppingBuck opened this issue Jul 17, 2020 · 10 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed Mautic 3 Docs updates relating to Mautic 3.x

Comments

@StoppingBuck
Copy link

StoppingBuck commented Jul 17, 2020

Inspired by this old, closed Mautic issue I think it would be a good idea to have a list of the required PHP modules somewhere in the Documentation - the docs mention the required PHP version, but not what extensions should be enabled. There is an extensions check done during installation, as the Getting started mentions in passing, but it would be nice to have a list somewhere in the docs so we don't have to go digging in app/bundles/InstallBundle/Configurator/Step/CheckStep.php to find it 🙂


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@RCheesley RCheesley added good first issue Good for newcomers help wanted Extra attention is needed Mautic 3 Docs updates relating to Mautic 3.x labels Jul 17, 2020
@RCheesley
Copy link
Member

Thanks for the suggestion @StoppingBuck - I've often thought that this would be really helpful!

@szepeviktor
Copy link

szepeviktor commented Jul 17, 2020

Simply take your source code

https://github.com/mautic/mautic/blob/b584b356315fea69208daac881541f4c7d01311a/composer.json#L6-L16

ask PHP CompatInfo what extensions are used

https://github.com/llaville/php-compat-info

and remove default extensions (mainly php -n -m)

Done 🍏

@StoppingBuck
Copy link
Author

StoppingBuck commented Aug 12, 2020

For 2.16 (since I haven't upgraded to M3 yet):

Going through
https://github.com/mautic/mautic/blob/2.16/app/bundles/InstallBundle/Configurator/Step/CheckStep.php
together with
https://github.com/mautic/mautic/blob/2.16/app/bundles/InstallBundle/Translations/en_US/messages.ini
I seem to find these PHP modules:

Mandatory:

  • php-ctype
  • php-curl
  • php-fileinfo
  • php-json
  • php-mbstring
  • php-tokenizer
  • php-session (turned on by default in PHP, see @szepeviktor comment below)
  • php-openssl (turned on by default in PHP, see @szepeviktor comment below)
  • php-prce (turned on by default in PHP, see @szepeviktor comment below)
  • XML extensions. The code mentions both "the SimpleXML extension", "the XML extension" and php-xml, but I'm guessing they're all the same module. At least on Ubuntu, php-simplexml is a virtual package pointing to php-xml. It might also be referring to libxml.

Optional:

  • php-iconv (optional)
  • php-imap (optional)
  • php-intl (optional)
  • php-posix (optional)
  • php-zip (optional) - EDIT: Seems to be mandatory for the M3 upgrade script

Some not-directly-module-related checks:

  • mautic.install.apc.version="When using APC, you must use version %minapc% or newer. You have version %currentapc% installed. Please update your APC extension."
  • CheckStep also checks for Suhosin: mautic.install.suhosin.whitelist="Suhosin is not properly configured, add <strong>phar</strong> to <strong>suhosin.executor.include.whitelist</strong> in your PHP configuration."
  • Likewise, mautic.install.xdebug.exception.trace="Xdebug's 'show_exception_trace' option should be disabled in your PHP configuration." and mautic.install.xdebug.scream="Xdebug's 'scream' option should be disabled in your PHP configuration."
  • Also mautic.install.xdebug.nesting="Set <strong>xdebug.max_nesting_level</strong> to at least <strong>250</strong> in your PHP configuration to stop Xdebug's infinite recursion protection from erroneously throwing a fatal error."
  • And finally mautic.install.extension.eaccelerator="eAccelerator is incompatible with Mautic. Please disable it."

Next step is to check what has changed for M3 - and then, find where to put the list 🙂

@szepeviktor
Copy link

szepeviktor commented Aug 12, 2020

Some PHP extensions are build into the php binary.

You may survey your php binary by issuing php -n -m

💡 There are funky linux distributions lacking some extension from the php binary.

@szepeviktor
Copy link

szepeviktor commented Aug 12, 2020

PHP 7.3.21-1+0~20200807.66+debian9~1.gbp18a1c2 has

Core
date
filter
hash
libxml
openssl
pcntl
pcre
Reflection
session
sodium
SPL
standard
zlib

php7.3-xml on e.g. Debian contains

/usr/lib/php/20180731/dom.so
/usr/lib/php/20180731/simplexml.so
/usr/lib/php/20180731/wddx.so
/usr/lib/php/20180731/xml.so
/usr/lib/php/20180731/xmlreader.so
/usr/lib/php/20180731/xmlwriter.so
/usr/lib/php/20180731/xsl.so

@StoppingBuck
Copy link
Author

Another one that's needed (found out by accident) is php-mysqli (if you are using mysqli as database connector)

@CybotTM
Copy link

CybotTM commented Jan 18, 2021

What about imagemagick/graphicsmagick or (My)SQL client, cron?
Is this documented anywhere already?

@RCheesley
Copy link
Member

Thanks @CybotTM for your many comments today! Indeed as the issue highlights, this is not currently documented but we want to improve this. One of our strategic initiatives is to improve the install upgrade process and the accompanying documentation however we have not yet managed to get folk together to form the team. Would that be of interest?

If you would like to kick it off you can make a PR to this repo and review the styleguide for contributing here.

@CybotTM
Copy link

CybotTM commented Feb 13, 2021

@RCheesley , thanks for the hint, but I'm currently busy with building a Mautic container image. Which is updatable and for all major 3 versions: https://github.com/netresearch/docker-mautic - my findings are added there.

@RCheesley
Copy link
Member

Great - would be awesome if you would consider joining the team who are maintaining the official Docker image - it is very much under resourced and we would welcome more involvement!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers help wanted Extra attention is needed Mautic 3 Docs updates relating to Mautic 3.x
Projects
None yet
Development

No branches or pull requests

4 participants