SuiteCRM8 install issues on FreeBSD/Truenas

I’ve been evaluating v7.11 but I figured with the difference in v8, I would be better to switch to v8 as the ongoing choice.


  • Truenas 12 (FreeBSD) jail using vnet
  • FAMP installed - tried with PHP8 and hit issues (same with 7.x) so reinstalled with Apache2.4, MySQL8 & PHP7.4
  • All listed required modules installed.
  • Web Root is /usr/local/www/apache24/data
  • Document Root is /usr/local/www/apache24/data/public

Rewrites are enabled
Permissions are 2775 and 664 (just to rule out issues…)
Virtual Host file is configured and enabled with ‘Require All Granted’ in place of ‘Order Allow,Deny’ as I’m on Apache24.

DocumentRoot /usr/local/www/apache24/data/public
<Directory /usr/local/www/apache24/data/public>
    AllowOverride All
    Require all granted
    Allow from All

The additions from the Install Page have been added.

I can successfully pull up an ‘info.php’ file in the public directory and can also access phpMyAdmin.

Hitting resulted in a blank page so I turned on error reporting in the php.ini file. Refresh the page and I get the following:

Fatal error*: Uncaught LogicException: Extension DOM is required. in /usr/local/www/apache24/data/vendor/symfony/config/Util/XmlUtils.php:50 Stack trace: #0 /usr/local/www/apache24/data/vendor/symfony/config/Util/XmlUtils.php(146): Symfony\Component\Config\Util\XmlUtils::parse(’<?xml version="…’, Array) #1 /usr/local/www/apache24/data/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php(384): Symfony\Component\Config\Util\XmlUtils::loadFile(’/usr/local/www/…’, Array) #2 /usr/local/www/apache24/data/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php(50): Symfony\Component\DependencyInjection\Loader\XmlFileLoader->parseFileToDOM(’/usr/local/www/…’) #3 /usr/local/www/apache24/data/vendor/doctrine/doctrine-bundle/DependencyInjection/DoctrineExtension.php(106): Symfony\Component\DependencyInjection\Loader\XmlFileLoader->load(‘dbal.xml’) #4 /usr/local/www/apache24/data/vendor/doctrine/doctrine-bundle/DependencyInjection/DoctrineExtension.php(77): Doctrine\Bundle\DoctrineBundle\DependencyInjection\Doctrine in /usr/local/www/apache24/data/vendor/symfony/config/Util/XmlUtils.php on line *50

OK…let’s go ahead and install the (unlisted) php74-dom extension…

Refresh the page and I get this instead:

Fatal error*: Uncaught Error: Call to undefined function token_get_all() in /usr/local/www/apache24/data/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php:54 Stack trace: #0 /usr/local/www/apache24/data/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php(60): Doctrine\Common\Annotations\TokenParser->__construct(’<?php namespace…’) #1 /usr/local/www/apache24/data/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php(380): Doctrine\Common\Annotations\PhpParser->parseUseStatements(Object(ReflectionClass)) #2 /usr/local/www/apache24/data/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php(301): Doctrine\Common\Annotations\AnnotationReader->collectParsingMetadata(Object(ReflectionClass)) #3 /usr/local/www/apache24/data/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php(142): Doctrine\Common\Annotations\AnnotationReader->getImports(Object(ReflectionClass)) #4 /usr/local/www/apache24/data/vendor/ in /usr/local/www/apache24/data/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php on line *54

Any ideas? There is no difference if I try to hit - same message.



I made progress by installing DOM (pkg install php74-dom) and then some Googling led me to investigate the issue with TokenParser.php. It transpires that I also needed Tokenizer (pkg install php74-tokenizer) to deal with that issue.

Following that, I am still getting the blank page at Document Root but the CLI runs and does the SuiteCRM install.

Post install, I still get the blank page at Document Root. It seems that the index.php is looking for ~10.23/api/graphql which is not in the directory structure.

I hypothesize that it could be a rewrite path and that my rewrite isn’t working as expected.


@clemente.raposo - I’ve built and torn down my install a few times (LOL…about 20…) to test various changes etc. On Truenas (FreeBSD 12) I MUST install php74-dom and php74-tokenizer for SuiteCRM8 to work. You may want to either add then to the list of required extensions or perhaps make an OS-specific note. I don’t think it is just my installation that is going to require it.

Another interesting note which I have replicated is that if I script the unpack of the suitecrm .zip file to the web root (usr/local/www/apache24/data in my case running in a jail on Truenas) then the problems seem to persist with a blank document root at the /public sub-directory. If I manually unpack and FTP the contents of the zip file to the web root, all works as expected.

At this stage, I’m not entirely sure what the issue is with the script unpack but I may cycle back later.

The new problem - there had to be one, right? - is that after running the web install, I can log on and access the main menu consoles but accessing ‘Home’ or anything on the Admin drop-down panel results in an Internal Server Error. Error log cites:

[core:alert] [pid 42765] [client] /usr/local/www/apache24/data/public/legacy/.htaccess: RewriteBase: argument is not a valid URL, referer:

So, some rewrites appear to be working correctly and others not. Back on it tomorrow I think.

Hi @TripitakaBC,

Sorry for the delay in replying.

Many thanks for the feedback. I’ll add those modules to the list.

Regarding the following error:

When you go to a module like Accounts does it work ok?

  • Some notes on this:
    • Accounts is one of the modules using new Suite 8 views.
    • While admin is using classic view.

Could you check the .htaccess file on public/legacy please? what value do you have on RewriteBase? is it /legacy?

No problem!

public/legacy/.htaccess has the following:

<IfModule mod_rewrite.c>
    Options +SymLinksIfOwnerMatch
    Options -Indexes
    Options -MultiViews
    RewriteEngine On
    RewriteBase localhostlegacy/
    RewriteRule ^cache/jsLanguage/(.._..).js$ index.php?entryPoint=jslang&modulename=app_strings&lang=$1 [L,QSA]
    RewriteRule ^cache/jsLanguage/(\w*)/(.._..).js$ index.php?entryPoint=jslang&modulename=$1&lang=$2 [L,QSA]

    # --------- DEPRECATED --------
    RewriteRule ^api/(.*)$ - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteRule ^api/(.*?)$ lib/API/public/index.php/$1 [L]
    # -----------------------------

    RewriteRule ^Api/(.*)$ - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteRule ^Api/access_token$ Api/index.php [L]
    RewriteRule ^Api/V8/(.*?)$ Api/index.php [L]

What is interesting to me is that the RewriteBase doesn’t add a / after whatever is typed into the URL box during config. I’m not smart enough to figure out whether that entry should read http://localhost/legacy (which would translate for me to be /usr/local/www/apache24/data/public/legacy) or if it should be something else. I can’t figure out how to unlock the installer to re-run installation so each time I want to try something, I need to rebuild the whole jail.

Working through what does (Yes) and does not (No, works as expected) throw the ‘Internal Server Error’:
Home (house icon): Yes
Accounts: No
Contacts: No
Opportunities: No
Leads: No
Quotes: No
Calendar: Yes
Documents: No

From the ‘More’ menu:
Emails: Yes
All the rest: No

From the ‘Administrator’ menu:
Profile: Yes
Employees: No
Support Forum: No
Admin: Yes
About: Yes
Logout: No

Hope this helps.

Hi @TripitakaBC ,

Thanks for the feedback.

That RewriteBase is clearly wrong as you said.

With the setup you have it should be simply ‘/legacy’. Plus it matches with the routes you said that didn’t work.

Could you try with ‘/legacy’ please?

Regarding the generation of the RewriteBase, when have a bug there. Would you mind creating a bug for it on GitHub please? SuiteCRM-Core project. If you don’t have the time I’ll do it once I get a chance.


Now it gets more interesting. I just did a fresh rebuild and at the install screen I entered the URL as ' - previously I had just been entering ‘’ or ‘localhost’.

the legacy/.htaccess file RewriteBase now looks like this:

<IfModule mod_rewrite.c>
Options +SymLinksIfOwnerMatch
Options -Indexes
Options -MultiViews
RewriteEngine On
RewriteBase /legacy/
RewriteRule ^cache/jsLanguage/(.._..).js$ index.php?entryPoint=jslang&modulename=app_strings&lang=$1 [L,QSA]
RewriteRule ^cache/jsLanguage/(\w*)/(.._..).js$ index.php?entryPoint=jslang&modulename=$1&lang=$2 [L,QSA]

# --------- DEPRECATED --------
RewriteRule ^api/(.*)$ - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^api/(.*?)$ lib/API/public/index.php/$1 [L]
# -----------------------------

RewriteRule ^Api/(.*)$ - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^Api/access_token$ Api/index.php [L]
RewriteRule ^Api/V8/(.*?)$ Api/index.php [L]

The menus now work as expected so that was absolutely the issue. Should be easy to fix by forcing the format entered into that field, I assume.

Thanks for your help.

Github issue raised. Issue #33.

Hi @TripitakaBC,

Glad to hear you were able to solve it!

Thank you for raising the issue #33

If there is any extra feedback you would like to provide, please have a look at the following topic, which is a place to start.