mautic / mautic-documentation

User documentation for the Mautic project
https://docs.mautic.org
Apache License 2.0
20 stars 102 forks source link

Make a list of all required PHP modules #89

Open StoppingBuck opened 4 years ago

StoppingBuck commented 4 years ago

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 :slightly_smiling_face:

--- Want to back this issue? **[Post a bounty on it!](https://app.bountysource.com/issues/95588486-make-a-list-of-all-required-php-modules?utm_campaign=plugin&utm_content=tracker%2F178811078&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://app.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F178811078&utm_medium=issues&utm_source=github).
RCheesley commented 4 years ago

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

szepeviktor commented 4 years ago

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 commented 4 years ago

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:

Optional:

Some not-directly-module-related checks:

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

szepeviktor commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

CybotTM commented 3 years ago

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

RCheesley commented 3 years ago

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 commented 3 years ago

@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 commented 3 years ago

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!