Issue with SuiteCRM installation - Internal Server Error and CSRF Token Issues

Hi everyone,

I have some problems by installing SuiteCRM on my server and hope someone can help to find and solve the issues.

I have the following configuration for my SuiteCRM installation:

  • AlmaLinux 9.5
  • Plesk Obsidian v18.0.65
  • MariaDB 10.11.10
  • PHP 8.2.26
  • Cloudflare CDN is being used
  • SSL certificate from Let’s Encrypt
  • Subdomain “crm.my-domain.com” in Plesk with root directory “httpdocs/crm/public”.
  • The “crm” folder and all subfolders/files have the owner “my-domain” and the group “psacln”.
  • All directories in the “crm” folder, as well as the “crm” folder itself, have permission 2775, and all files in the “crm” folder have permission 0664. Additionally, the command “chmod +x bin/console” was executed in the “crm” folder.

Apache & nginx settings for “crm.my-domain.com” in Plesk were configured as follows:

  • “Restrict following symbolic links” is disabled.

Additional HTTP settings:

<Directory /var/www/vhosts/my-domain.com/httpdocs/crm/public>
    AllowOverride All
    Require all granted
    Options -Indexes +FollowSymLinks
</Directory>

Additional HTTPS settings:

<Directory /var/www/vhosts/my-domain.com/httpdocs/crm/public>
    AllowOverride All
    Require all granted
    Options -Indexes +FollowSymLinks
</Directory>

Nginx settings for “Proxy Mode” and “Smart Static File Handling” are enabled.

However, when accessing the “Pre-Installation requirements” page at “https://crm.my-domain.com/install.php”, I receive the following warnings:

ROUTE ACCESS CHECK Warning:
Curl Request on Main Page:

  • The SuiteCRM Title cannot be found. This is not a valid SuiteCRM Page.
  • The URL used for the call was: https://crm.my-domain.com/
  • The result of the call was:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="robots" content="noindex,nofollow,noarchive" /> <title>An Error Occurred: Internal Server Error</title> <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>❌</text></svg>" /> <style>body { background-color: #fff; color: #222; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; margin: 0; } .container { margin: 30px; max-width: 600px; } h1 { color: #dc3545; font-size: 24px; } h2 { font-size: 18px; }</style> </head> <body> <div class="container"> <h1>Oops! An Error Occurred</h1> <h2>The server returned a "500 Internal Server Error".</h2> <p> Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused. </p> </div> </body> </html>

Curl Request on Api:

  • Unable to retrieve System Configs on Graphql Page. Please refer to the install.log for more information.
  • The URL used for the call was: https://crm.my-domain.com/api/graphql
  • The result of the call was:
{"@id":"\/api\/errors\/403","@type":"hydra:Error","title":"An error occurred","detail":"Invalid CSRF token","status":403,"type":"\/errors\/403","hydra:title":"An error occurred","hydra:description":"Invalid CSRF token"}

When I click on “ignore warnings and process”, the URL “https://crm.my-domain.com/public/install.php#/install” leads to a “404 Not Found” error.

What should I configure to ensure SuiteCRM can be properly installed and function correctly? Unfortunately I haven’t found a working solution yet.

Thank you to everyones help. :slightly_smiling_face:

Set the required permissions

If you are using the terminal you can do this by running:

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

Please have in mind that:

  • The user and group name (in the above example www-data ) needs to be replaced by the actual system user and group that your webserver runs under. This varies depending on your operating system. Common web server users are as follows:

    • www-data (Ubuntu Linux/Apache)
    • apache (Linux/Apache)

make sure you have all php module installed.


Thank you, I have already read the documentation and all permissions are set correctly.
But meanwhile I found the issue by my own.

Maybe it will help someone who has the same issue:

In my case the default value for session.save_path was not included in open_basedir.
So I created a new folder with permission 770 inside open_basedir (because of security reasons because default session.save_path was outside {WEBSPACEROOT}) and that solved both issues.