Unable to reinstall Suitecrm8

I have been unable to reinstall suitecrm since about Xmas. Its not a matter of life , death or income so I’ve been plugging away using virtual box.
Using my trusty tried and true scripts which has always worked before, and various adaptations thereof, Ive have worked my way through various Mint versions, ( run into php version problems), Debian ( creates a blank installation page), Fedora, MX ( cannot get into installation page) and today Ubuntu 22.04.1 LTS which after update installed a php version of 8.1.2. The matrix says this is incompatible, so I didn’t bother proceeding .

So several questions. Well, actually just one.

  1. What do I do now ? regarding php versions ?

Script is attached. Perhaps its obvious where I am going wrong, but I just don’t see it…

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install apache2 apache2-utils libapache2-mod-php libpcre3 libpcre3-dev zlib1g zlib1g-dev mariadb-server unzip
sudo apt-get install php
sudo apt-get install php-cli
sudo apt-get install php-curl
sudo apt-get install php-intl
sudo apt-get install php-json
sudo apt-get install php-gd
sudo apt-get install php-mbstring
sudo apt-get install php-mysqli
sudo apt-get install php-soap
sudo apt-get install php-xml
sudo apt-get install php-zip
sudo apt-get install php-imap
sudo apt-get install php-ldap

sudo apt-get install php-openssl <–unable to locate package…MX Linux…Linux Mint
sudo apt-get install php-pdo_mysql <–unable to locate package…MX Linux…Linux Mint
sudo apt-get install php-mysqli <—Already installed …Linux Mint
sudo apt-get install php-pdo_mysql <— Unable to locate package…Linux Mint
sudo apt-get install php-common <–already the newest…MX Linux…Linux Mint

–Start the Apache service and enable Apache and MariaDB to enable on system start
—MX Linux won’t start apache unless Systemd is enabled at boot

sudo systemctl start apache2
sudo systemctl start mysql
sudo systemctl enable apache2
sudo systemctl enable mariadb

–Edit php.ini

sudo nano /etc/php/7.4/apache2/php.ini . Location varies per php version.

upload_max_filesize = 8M <–Note this must be > 6M as 6M gives error.
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE & ~E_WARNING

–Secure and harden MariaDB.

sudo mysql_secure_installation

–Create database

sudo mysql -u root -p
MariaDB [(none)]> CREATE DATABASE suitecrm;
MariaDB [(none)]> CREATE USER ‘larry’@‘localhost’ IDENTIFIED BY ‘password’;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON suitecrm.* TO ‘larry’@‘localhost’;
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit;

–Restart Apache

sudo systemctl restart apache2

--------------------------- this block is for Suitecrm7 install

–Download the latest SuiteCRM files
Create a directory here /var/www/html/suitecrm

– Unzip the downloaded file into the suitecrm directory
– Open a root terminal in the suitecrm directory
– Assign appropriate permission to the unzipped folder

sudo chown -R www-data:www-data /var/www/html/suitecrm
sudo chmod -R 755 /var/www/html/suitecrm

–Open your internet browser and enter URL:

http://localhost/suitecrm/install.php 1

–complete installation

-------------------------------end Suitecrm7 install -----------------------

-----------------------------this block is for Suitecrm8 install

–Create suitecrm folder at /var/www/html/suitecrm

–Download and unzip Suitecrm8 into the suitecrm folder var/www/html/suitecrm
–Open a root terminal from suitecrm folder. Set permissions for crm folder and all sub folders.

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;

–Configure URL re-writes. (Specific to Linux Mint, Possibly Debian and Ubuntu )

–create this document. /etc/apache2/sites-enabled/suitecrm.conf

–insert following

DocumentRoot /var/www/html/suitecrm/public
<Directory /var/www/html/suitecrm/public>
AllowOverride All
Order Allow,Deny
Allow from All
Require all granted

-or–

<VirtualHost *:80>

DocumentRoot /var/www/html/suitecrm/public
<Directory /var/www/html/suitecrm/public>
AllowOverride All
Order Allow,Deny
Allow from All
Require all granted

–enable rewrites and restart apache. Typos in suitecrm.conf will result in errors in restarting apache.

sudo a2enmod rewrite
sudo systemctl restart apache2

–To start install, enter this address into browser.
-Note that a bug in suitecrm8 will create a formatting error in public/legacy/.htaccess which we will fix after initial setup.

localhost/suitecrm/public

–Accept License, then click on configuration,

–Fill in the form with

URL = https://localhost/suitecrm
-or
URL = hhtps://127.0.0.1

DataBase User = larry
Password = secret password
Host name = 127.0.0.1 <–Use of name localhost is not supported yet
Database Name = suitecrm
DataBasePort = 3306 ← This is default for mariadb and mysql

Application Admin Name = admin
Admin User password = password

–Edit /var/www/html/suitecrm/public/legacy
–Correct formatting error caused by wrong pathing in the .htaccess under rtewrite rules.
–Look for these two lines

RewriteEngine On
RewriteBase /crm/SuiteCRM-8.0.1legacy/ <------- This line is malformed.

– edit second (malformed) line to

RewriteBase /suitecrm/public/legacy/

–and save.

–Logon using browser.

http://localhost/suitecrm
-or
http://127.0.0.1/suitecrm

Thanks.

Forgot. My other favorite error, after I get to the install page is:
Database Connection error: The provided database hostname, port, username, and /or password is invalid"

and from the logs, it doesn’t seem to be able to connect to the database…

Reviewing my "trustworthy script, I see inexplicable typos in it that were not in the original. It looks like spaces got removed after the chmod 2755 {} and after the chmod 0644. This may be an artifact of pasting into a web page. So I fixed my copy…again. Also the suitecrm.conf document didnt copy across correctly. It should be

DocumentRoot /var/www/html/suitecrm/public
<Directory /var/www/html/suitecrm/public>
AllowOverride All
Order Allow,Deny
Allow from All
Require all granted

However. It still doesn’t work. My last effort was with Mint 20.1 in a Virtualbox. Now I am twice as befuddled. Any suggestions ?

Using Linux mint 20.1. This time I made it all the way through the install screen before I got the Database connection error…etc.

Curiously, I didn’t see any option to accept suitecrm licensing. No tabs either…
I’m also still finding odd typing errors in my once perfect script. Now I’m wondering if Ive got a bad memory stick. Memtest said it was ok though.

I would advise staying with Ubuntu 22.04, it is by far the most tested configuration and works really well.

Just use commands to install the PHP version you want, not just “php” in general. Google for it, but it’s stuff like this:

apt install zip unzip iotop htop php-mbstring php7.3-mbstring php-gettext php7.3-xml php7.3-zip php7.3-imap php7.3-gd php7.3-curl php7.3-intl php7.3-mysql php-gd phpmyadmin

Those are my notes for 7.3, you’ll have to find the equivalent for 7.4 (which I would recommend), normally you just have to change the number, but sometimes other minor adjustments to the package names are necessary.

upload_max_filesize needs to be a lot larger for the upgrade packages, say, 80M

NOTE: to put code into these forums without any changes, put a triple backtick in a line all by itself, then the code, then close with another similar line of backticks:

```
code
```