Errors setting up SuiteCRM

So some background is this is on a separate disk away from root on /mnt/suitecrm which is sdb. Our current production is within / itself and that causes issues when you need to expand and is done improperly. We lost 3 weeks of data spurring the need to rebuild the machine on a separate partition for the service.

This is the error I am receiving:
15:48:20 CRITICAL [php] Fatal Compile Error: $GLOBALS can only be modified using the $GLOBALS[$name] = $value syntax
[
“exception” => Symfony\Component\ErrorHandler\Error\FatalError^ {
#message: “Compile Error: $GLOBALS can only be modified using the $GLOBALS[$name] = $value syntax”
#code: 0
#file: “./public/legacy/install/performSetup.php”
#line: 782
-error: [
“type” => 64,
“message” => “$GLOBALS can only be modified using the $GLOBALS[$name] = $value syntax”,
“file” => “/mnt/suitecrm/core/public/legacy/install/performSetup.php”,
“line” => 782
]
}
]

In performSetup.php line 782:

[Symfony\Component\ErrorHandler\Error\FatalError]
Compile Error: $GLOBALS can only be modified using the $GLOBALS[$name] = $value syntax

Exception trace:
at /mnt/suitecrm/core/public/legacy/install/performSetup.php:782

Thank you

That’s a problem with PHP version versus SuiteCRM version.

You need to stay inside the specs in this matrix here:

1 Like

Hey,

Thank you for the quick response! You wouldn’t happen to know how to get me from 8.1 to 8.0 on RHEL 9 would you? I have been trying to get it to install the previous version and it doesn’t seem to want to pull PHP 8.0.

Thanks

There are typically two steps, one is installing the binaries, the other is getting the web server to use the ones you prefer. In ubuntu this 2nd part on Apache is done with a2enmod, i suppose on RHEL it is the same.

but this is web server configuration stuff you can easily find in google, specific to your version.

Hey,

I think I figured that out but now I get this:
SuiteCRM Silent Install

Running: check-install-lock
15:25:44 INFO [install] Running step: check-install-lock
15:25:44 INFO [install] step: check-install-lock | status: done
15:25:44 INFO [install] step: check-install-lock | messages:
15:25:44 INFO [install] Installer not locked. Proceeding with install
15:25:44 INFO [install] step: check-install-lock | debug: no debug info
step: check-install-lock | status: done
Installer not locked. Proceeding with install
Running: check-db-connection
15:25:44 INFO [install] Running step: check-db-connection
15:25:44 ERROR [app] An error occurred while checking the Database Host Connection could not find driver
15:25:44 INFO [install] step: check-db-connection | status: failed
15:25:44 INFO [install] step: check-db-connection | messages:
15:25:44 INFO [install] Could not connect to db
15:25:44 INFO [install] step: check-db-connection | debug: no debug info
step: check-db-connection | status: failed
Could not connect to db

This guide for Fedora should help you

Hello.
I am coming in this discussion because it looks the more recent regarding the issue.
I have a VM running on Ubuntu server 22.04.
Installing suite CRM by CLI, I had the same issue. That’s why I found this thread.

I did downgrade to php 8.0 as mentioned by @pgr.
My php info states " PHP Version 8.0.27".
I did reboot the VM

However, I am still unable to install SuiteCrm. It is a pity because I would like to experience with SuiteCRM8.

Here are the messages I receive when I “suitecrm:app:install”

PHP Deprecated:  Return type of Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag::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/suitecrm/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php on line 134
PHP Deprecated:  Return type of Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/suitecrm/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php on line 144
PHP Deprecated:  Return type of Symfony\Component\HttpFoundation\Session\Session::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/suitecrm/vendor/symfony/http-foundation/Session/Session.php on line 131
PHP Deprecated:  Return type of Symfony\Component\HttpFoundation\Session\Session::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/suitecrm/vendor/symfony/http-foundation/Session/Session.php on line 141

SuiteCRM Silent Install
============

Running: check-install-lock
step: check-install-lock | status: done
Installer not locked. Proceeding with install
Running: check-db-connection
step: check-db-connection | status: done
DB credentials ok
Running: install-system-checks
step: install-system-checks | status: done
Running: create-config
step: create-config | status: done
Created silent install config: config_si.php
Running: create-env
step: create-env | status: done
Created .env.local
Running: run-legacy-install
21:06:59 CRITICAL  [php] Fatal Compile Error: $GLOBALS can only be modified using the $GLOBALS[$name] = $value syntax ["exception" => Symfony\Component\ErrorHandler\Error\FatalError^ { …}]

In performSetup.php line 782:
                                                                                          
  Compile Error: $GLOBALS can only be modified using the $GLOBALS[$name] = $value syntax  
                                                                                          

suitecrm:app:install [-U|--db_username DB_USERNAME] [-P|--db_password DB_PASSWORD] [-H|--db_host DB_HOST] [-Z|--db_port DB_PORT] [-N|--db_name DB_NAME] [-u|--site_username SITE_USERNAME] [-p|--site_password SITE_PASSWORD] [-S|--site_host SITE_HOST] [-d|--demoData [DEMODATA]] [-W|--sys_check_option SYS_CHECK_OPTION]

I am not the biggest specialist in the area, any help would be welcome because I really do not know where to look, especially with these deprecated notices when I run a supported version of php

Thanks

Does that error go away with PHP 7.4?

Hello,
Sorry for the delay, I was used to received updates by email on this forum. Was not the case here.
By the way , I downgraded to php7.4 and did a2dismod php8.0.
My phpinfo is 7.4. And the message is still the same.

I hope to find a way around because my goal is to set a Nextcloud on the same server, and it won’t be happy with 7.4… I will double-check all the settings and keep you informed if it changes anything.

Regards

Well, I did follow again the official installation tutorial and I passed the problem.

I believe it had something to do with vhost but not sure.

I have now an error 500 but that’s an other story.

Thank you very much

Just for info : I went back to php 8.1 and double-checked permissions, the error 500 became a 304 and a beautiful blank screen welcomed me (index.php was written in the address bar)
I did as mentioned in the documentation :

Legacy config in public/legacy/config

site_url:

    if you don’t have your vhost pointing to the public dir within your SuiteCRM 8 root folder, you should append /public to your current host

        e.g. if your address is something like https://your-host/crm/public,

There was an extra " / "

at the end of public.

I went back to the vhost configuration and deleted /public.

After restarting apache2, I entered by hand …/public/index.php and :see_no_evil: I have been able to log in :partying_face: :tada: :piñata:

At the end of the day and as a feedback : It is a test configuration on a VM so it is not a big issue to have the root folders available for the public at the moment. :eyes: But I truly need to figure out this rewrite / redirect rules. :brain:
At the same time, it took me something like 5 hours just to be able to log on :exploding_head::face_with_diagonal_mouth:. I must have missed something in the documentation but I don’t know what :thinking:. (English is not my mother tongue, but I think I can read it easily…).
Time to experience this new version now. :smiling_face:

Thanks to all the team behind the project.:index_pointing_at_the_viewer: :+1:


Well edit :exploding_head:
Well, :exploding_head:

My installation did not allow me to upload anything from document to module builders.
I decided to start again the installation of suitecrm 8.2 from the beginning.
Deleted Database and root folders.
I followed again the installation guide, decided to work under php7.4…

There is something unclear that I missed, about vhost maybe (4 hours that I am trying to find a way around) .
The /public directory send me a beautiful error 500…
And when I try to install by cli : I have an error

Upload File Size | error | Warning: Your PHP configuration should be changed to allow files of at least 6MB to be uploaded.

however my php info agrees with

/etc/php/7.4/cli/php.ini:846:upload_max_filesize = 200M
/etc/php/7.4/apache2/php.ini:846:upload_max_filesize = 200M

post-size is at 201M… .

I am truly lost. I love Suite CRM, I have a LTS version working for ages on a raspberry (ubuntu server) , but I do not understand how I am unable to install its 8.x.x version and make it run on a Ubuntu22.04 VM.

That’s make me mad. If somebody as a working tutorial from A to Z for suitecrm8.2 on Ubuntu 22.04, please help.

Regards and thx

2 Likes

@MaitreCake , I am encountering the same error as you. It still has no luck migrating my Suite CRM 7.12.x to 8.2.x. I tried it in both the 7.4 and 8.0 instances. I can`t even install a fresh SuiteCRM 8. If ever you were able to resolve this issue, can you share with us the workaround?

Will have a look as soon as possible.
I may start from a fresh install and document every click I do.
If it works, I gonna let you know. My instinct (because I have not a huge computer background) tells me that it comes from redirection or Vhost. If a specialist sees this message, could he check if there is no extra or missing

" " " or " / " or " public "

in the official tutorial ? It may help.

Thanks again :exploding_head:

So I did try.
Regarding the redirection , it looks like it is working now working.
I may have missed 2 things

  • The link to Digital Ocean in the tutorial does not refer to the proper configuration file in apache2 (mod write). Thanks to stack overflow it looks like the redirection works now :
`In case you are on Ubuntu, edit the file /etc/apache2/apache2.conf (here we have an example of /var/www):

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

and change it to;

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

then,

sudo service apache2 restart

You may need to also do sudo a2enmod rewrite to enable module rewrite.`
  • Once working in site-available , a a2ensite suitecrm.conf may help as well.

However, I had an other issue again with this php download limit on installation, but I spot something :
On install by cli I had a message mentionning php8.2. My phpinfo() is on 7.4…

So I went to change the download and post limits on the php.ini in 8.2 (not active on my system) and the installation worked…

I followed the instruction on the tutorial and I still have a beautiful error 500 themed by SuiteCRM.
A `apt-get purge php8.* did not change anything. I do not find anything relevant in my apache log :face_with_spiral_eyes:

Any help is welcome. I hope I do post in the good discussion.

thx

I don’t know if it is the conflict between the php version recognized previously by suiteCRM and the one mentioned by the phpinfo() or the apt purge php8.* I did previously(in the previous post) … but at the end of the day I find a workaround doing :

sudo apt install php7.4-cli php7.4-common php7.4-curl php7.4-mbstring php7.4-gd php7.4-mysql php7.4-soap php7.4-xml php7.4-imap php7.4-intl php7.4-opcache php7.4-json php7.4-zip

SuiteCRM 8.2.3 looks like working, including downloading, on php7.4 ubuntu22.04 apache2 mariaDB . :tada: :piñata: :partying_face:

I hope this long thread may help. Good luck :see_no_evil: :muscle:

As mentioned previously, I will need an environment on php8.x later on, but that’s another story

@waraikobuot Keep us informed

Hi @MaitreCake , I was able to install fresh SuiteCRM 8 and migrate from Suite7 to Suite8 in both PHP 7.4 and 8.0. But my migration in php8.0 has layout issues, and I don`t know why since I did the same procedure in my php7.4 migration and php8.0. The only difference between the two is the PHP version.

Please disregard this one; I don`t know why it is working now.

There are two different PHP environments, both of them need to be configured correctly.

One is command-line (CLI) which you can inspect with php -i

The other is web server, which you can inspect with a web page serving the outputs of phpinfo()

Each has a separate php.ini file.

I did a2dismod PHP 8.2 and set both php.ini in 7.4/Apache and 7.4/cli.
But the SuiteCRM installation by cli referred to 8.2. I have not a clue why this happened… The settings (post and upload max size) of both the 8.2//php.ini make the installation possible by cli but I had a error 500 on frontend
Purge php8.
made this error disappeared for a blank screen.
I try to reinstall but the terminal told that there was an issue to connect the DB. I realised that php-mysql was missing so I did the apt install command I mentioned previously and it worked.
I must have done something wrong somewhere but I hope my experience will help.

By the way, do you mean that there a specific "cli dismod’ php version ?

Anyone facing PHP 8.1 and above, issue “PHP Fatal error: $GLOBALS can only be modified using the $GLOBALS[$name] = $value syntax in …\install\performSetup.php”, follow this to fix the install.

With ChatGPT’s help, I wrote this in that file:
//$GLOBALS = $varStack[‘GLOBALS’];
foreach($varStack[‘GLOBALS’] as $key => $value) {
$GLOBALS[$key] = $value;
}

Install of 7.x went fine after that!