# 5.0.1 installation with composer - 500 internal server error

**URL:** <https://forum.mautic.org/t/5-0-1-installation-with-composer-500-internal-server-error/30490>\
**Category:** Mautic 5 Install/Upgrade Support\
**Created:** [January 14, 2024, 9:00pm UTC](https://forum.mautic.org/t/5-0-1-installation-with-composer-500-internal-server-error/30490 "2024-01-14T21:00:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![emmanu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/emmanu/32/11151_2.png) [@emmanu](https://forum.mautic.org/u/emmanu)\
**Post date:** [January 14, 2024, 9:00pm UTC](https://forum.mautic.org/t/5-0-1-installation-with-composer-500-internal-server-error/30490/1 "2024-01-14T21:00:56Z")

</div>

**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](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/d/d90f4f60c8714f5540b25d5b10fd33439228fc4f.jpeg)

I followed the documentation here: [Installation — Mautic Documentation 0.1 documentation](https://docs.mautic.org/en/5.x/getting_started/how_to_install_mautic.html#using-the-recommended-project) 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](http://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.

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [January 14, 2024, 9:15pm UTC](https://forum.mautic.org/t/5-0-1-installation-with-composer-500-internal-server-error/30490/2 "2024-01-14T21:15:44Z")

</div>

What does the log say under /var/logs?

Also check the permissions on the filesystem.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [January 14, 2024, 9:35pm UTC](https://forum.mautic.org/t/5-0-1-installation-with-composer-500-internal-server-error/30490/3 "2024-01-14T21:35:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![emmanu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/emmanu/32/11151_2.png) [@emmanu](https://forum.mautic.org/u/emmanu)\
**Post date:** [January 15, 2024, 2:18pm UTC](https://forum.mautic.org/t/5-0-1-installation-with-composer-500-internal-server-error/30490/4 "2024-01-15T14:18:14Z")

</div>

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

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

```

It was so simple 😏

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [January 17, 2024, 2:18am UTC](https://forum.mautic.org/t/5-0-1-installation-with-composer-500-internal-server-error/30490/5 "2024-01-17T02:18:52Z")

</div>

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