• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Unable to install SuiteCRM: Symfony Runtime Exception. Tried everything - desperate

jhernanper

New Pleskian
Hi everyone,

I hope you are all having a great summer!!! This is my first post in this forum, so please bear with me!

My server has Plesk Obsidian v18.0.45 running over Ubuntu 20.04.4 LTS, with Apache version 2.4.41 and PHP version 8.0.21. Everything on a VPS with a dedicated IP. I have several websites and email accounts, all working fine. Been using Plesk for a month and I have to say that I love it! I decided that I wanted to install an open source CRM on my server and chose SuiteCRM. Tried with version 7.12 but got a similar error, so moved to try v8.1.2.

I have followed step by step the official installation guide for v8, as well as read and tried some tips given in the SuiteCRM and other forums. I have asked for help in the SuiteCRM forum but so far got very little and unproductive help. I hope someone here can help me :)

So this is what I have done:
  1. Uncompressed the zip file in my computer and then uploaded all files via ftp, as some people reported issues when uncompressing directly in the server.
  2. Created a subdomain crm.mydomain.com and pointed it to /suitecrm/public/
  3. Updated the system and installed PHP 8.0-FPM from Ubuntu at the ondrej/php repository, in order to be able to try workarounds with Plesk’s 7.4, Plesk’s 8.0.21 and the ‘official’ 8.0-FPM versions of PHP, even though the errors I get reproduce with all of them.
  4. Chose initially the ‘official’ 8.0-FPM version of PHP. Listed all modules and couldn’t see ‘cli’ nor ‘common’ on the list, so installed them. After installing them, listed all modules and still could not see them. Apparently these are packages of modules and not individual modules themselves...
  5. Enabled mod_rewrite in Apache in 2 ways: first with the ‘sudo a2enmod rewrite’ command (answered that it was already enabled) and, just in case, adding the ‘RewriteEngine on’ to the ‘http and https additional directives’ sections in the Apache settings tab of Plesk for the crm subdomain.
  6. Also added the directives ‘Options Indexes FollowSymLinks’, ‘AllowOverride All’ and ‘Require all granted’ to the /suitecrm/public folder using the Directory tag in the /etc/apache2/apache2.conf file using sudo nano.
  7. In Plesk’s PHP settings for this crm subdomain, added the [opcache] directives.
  8. I made sure that the username and group of Apache are both www-data. Once confirmed, I executed the following as suggested:

    find . -type d -not -perm 2755 -exec chmod 2755 {} ;
    find . -type f -not -perm 0644 -exec chmod 0644 {} ;
    find . ! -user www-data -exec chown www-data:www-data {} ;
    chmod +x bin/console

  9. After this, I tried to open the install page and got 3 errors. 2 were related to Composer and 1 was related to Symfony. So I updated both using the following:

    composer update --no-scripts vendor/symfony
    composer dump-autoload
    composer update

  10. With the above, I got rid of the 2 Composer errors, but the Symfony error still appears. This is what is shown in the logs:
Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\RuntimeException: Cannot autowire service “App\FieldDefinitions\LegacyHandler\CurrencyDropdownFunctionDefinitionMapper”: argument “$currencyHandler” of method “__construct()” has type “App\Currency\LegacyHandler\CurrencyHandler” but this class was not found. in /var/www/vhosts/plesk-subscription-name/httpdocs/website-folder/suitecrm/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php:54 Stack trace: #0 /var/www/vhosts/plesk-subscription-name/httpdocs/website-folder/suitecrm/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php(81): Symfony\Component\DependencyInjection\Compiler\DefinitionErrorExceptionPass->processValue()
#1 /var/www/vhosts/plesk-subscription-name/httpdocs/website-folder/suitecrm/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php(32): Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass->processValue()
#2 /var/www/vhosts/plesk-subscription-name/httpdocs/website-folder/suitecrm/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php(46): Symfony\Component\DependencyInjection\Compiler\DefinitionErrorExceptionPass->processValue()
#3 /var/www/vhosts/plesk-subscription-name/httpdocs/website-folder/suitecrm/vendor/symfony/dependency-injection/Compiler/Compiler.php(91): Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass->process()
#4 /var/www/vhosts/plesk-subscription-name/httpdocs/website-folder/suitecrm/vendor/symfony/dependency-injection/ContainerBuilder.php(731): Symfony\Component\DependencyInjection\Compiler\Compiler->compile()
#5 /var/www/vhosts/plesk-subscription-name/httpdocs/website-folder/suitecrm/vendor/symfony/http-kernel/Kernel.php(541): Symfony\Component\DependencyInjection\ContainerBuilder->compile() #6 /var/www/vhosts/plesk-subscription-name/httpdocs/website-folder/suitecrm/core/backend/Kernel.php(124): Symfony\Component\HttpKernel\Kernel->initializeContainer()
#7 /var/www/vhosts/plesk-subscription-name/httpdocs/website-folder/suitecrm/public/index.php(34): App\Kernel->getLegacyRoute() #8 {main} thrown in /var/www/vhosts/plesk-subscription-name/httpdocs/website-folder/suitecrm/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php on line 54

The only thing that I found on the internet about this error was someone who was using PHP 8.1 and when used 8.0 was able to solve his issue. But I am using 8.0 already and even when using 7.4 the error stays. I have tried to give 777 permissions to everything in the /suitecrm/ folder, but doesn't help. I made sure that Apache user and group are www-data and they own everything from /suitecrm/ inwards. I checked and don't have SELinux installed, there is just an SELinux folder with a semanage.config file but in it there is no SELinux line where to add the ‘disabled’. The error appears both trying to install SuiteCRM through the install page and through the terminal.

Any ideas on what else I could try to get this to work? I am very frustrated :( Thank you in advance for your time and if any of you who helps want to visit Spain I will be more than glad to invite you!!!


Cheers,

Javier
 
Back
Top