Problem while installing mautic 5.1

Your software
My Mautic version is: 5.1.0
My PHP version is: 8.0.30
My Database type and version is: mysql Ver 8.0.39

Your problem
My problem is:
I am doing a fresh install of the mautic, I have gotten the zip files, extracted them into a folder /var/www/mautic5.1 and changed the permissions of the files.Also I am using nginx to expose mautic. Now when I try to access the installer like in the documentation https://example.com/installer I get a 500 Internal Server error.

Cheked the errors in the /var/log/nginx/mautic.error and I get this:

thrown in /var/www/mautic5.1/app/config/bootstrap.php on line 5" while reading response header from upstream, client: [my IP], server: mailer.formstory.net, request: "GET /installer HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.0-fpm.sock:", host: "[my HOST]"
2024/09/02 09:50:28 [error] 3100415#3100415: *34225 FastCGI sent in stderr: "PHP message: PHP Warning:  require(/var/www/mautic5.1/app/../autoload.php): Failed to open stream: No such file or directory in /var/www/mautic5.1/app/config/bootstrap.php on line 5PHP message: PHP Fatal error:  Uncaught Error: Failed opening required '/var/www/mautic5.1/app/../autoload.php' (include_path='.:/usr/share/php') in /var/www/mautic5.1/app/config/bootstrap.php:5

I don’t know if I am missing some previous steps I need to do or something. If needed more information please do ask. Thank you!

Hi, can you please expand on what exact steps you’ve taken? Where did you download the zip file? Were you following some tutorial like Installation — Mautic Documentation 0.1 documentation ?

There are several ways how to install Mautic 5:

  1. Via the zip file
  2. Via Composer
  3. Via Docker(Compose) (see GitHub - escopecz/docker-compose-mautic: Deploy Mautic automatically with Github Actions to DigitalOcean)

Which path have you taken?

Hi,
I downloaded the zip file from the github repo, this link. Yes I was following the tutorial you provided. I am installing it via the zip file.
As I mentioned in the post I have extracted the file in the /var/www/mautic5.1 folder and changed the permissions of that folder using this command

sudo chown -R www-data:www-data /var/www/mautic5.1

I used nginx as I said to expose it (tell me if the config is needed). I have tried with previous version 4.4.11 and it works no problems, the installer is opened. I only get this with the 5x versions.

If you download it from Github then you have to install the dependencies yourself. Please use the download link in the documentation:

https://docs.mautic.org/en/5.x/getting_started/how_to_install_mautic.html#downloading-a-production-package

Thanks, mate. It now works perfectly, I installed it. But just one more question, why from github the version 4x works and the 5x don’t? Because when I tried with the 4x I didnt need to install any dependencies. Anyways thank you for your help!

I’m glad it works!

The Composer (PHP) libraries weren’t part of the Mautic 4 either. See what was included:

There is no vendor folder where Composer stores PHP libraries.

But in Mautic 5 even the Javascript libraries are not hard-coded to the git repository but installed via NPM which is a dependency manager for JS similar to Composer is for PHP. So those dependencies must be installed via a command too when you build it from Github or Composer.

But I don’t think you got to that problem. All the libraries are present in the production build linked in the doc.

1 Like

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