5.0.1 installation with composer - 500 internal server error

Your software
My Mautic version is: 5.0.1
My PHP version is:
PHP 8.1.27 (cli) (built: Dec 21 2023 20:19:54) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.27, Copyright (c) Zend Technologies
with Zend OPcache v8.1.27, Copyright (c), by Zend Technologies
My Database type and version is: 10.6.12-MariaDB-0ubuntu0.22.04.1

Your problem
My problem is:
After installing mautic 5.0.1 with composer the server returned a “500 Internal Server Error”.
Captura de tela 2024-01-14 214636

I followed the documentation here: Installation — Mautic Documentation 0.1 documentation and run the command

composer create-project mautic/recommended-project:^5 my-dir --no-interaction

no error during the installation process, just two warning:

Package Sensio/framework-extra-bundle is abandoned, you should avoid using it. Use Symfony instead.

Deprecation Notice: Return type of Mautic\Composer\Plugin\Scaffold\Operations\ScaffoldFileCollection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/myprojectfolder/vendor/mautic/core-composer-scaffold/Operations/ScaffoldFileCollection.php:118

And npm warning:

npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs

npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility

Despite this warning I received the message: Congratulation, you have installed the Mautic…

Than I pointed the server to html/myprojectfolder/docroot as suggested in the documentation by editing the files 000-default.conf, 000-default-le-ssl.conf and default-ssl.conf, the DocumentRoot path

When I opened mymauticdomain.com/installer in browser the server returned the 500 internal error.

I’m new in mautic and I don’t know how to solve this.
I installed some times ago mautic 4.10 without composer and I had no problems, but now mautic 5 no longer supports update without composer.

Any help is much appreciated.

What does the log say under /var/logs?

Also check the permissions on the filesystem.

I think it’s a file ownership error.
Composer will install all files as root, but it needs to be www-data.

Hi joeyk and mzagmajster!
Thank you for your replies, the problem was permissions, as you suggested!
I run this commands and all worked:

chown -R www-data:www-data /var/www/html
chmod -R 775 /var/www/html

It was so simple :smirk:

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.