Install Matrix 5.5

(Tbaatar) #1


I tried installing Matrix 5.5 on a server but can’t seem to get past installation Matrix installation step2. I’ve tried installing on both Centos 7.5 and Debain 9 (X64) with Postgres 9.6 and Apache or Nginex.

Upon running the step 2.php (also with check_requirements.php), I get the following:

PHP Warning: include_once(/home/websites/squiz_matrix/vendor/autoload.php): failed to open stream: No such file or directory in /home/websites/squiz_matrix/core/include/ on line 29

PHP Fatal error: Composer dependencies have not been installed, please run 'php install/fix_requirements.php' in /home/websites/squiz_matrix/core/include/ on line 30

and when you run:

php install/fix_requirements.php /home/websites/squiz_matrix/core/include/

ERROR: ERROR: Path provided doesn't point to a Matrix installation's System Root.

It says:

Is there a certain requirement with this new stack that is not mentioned in the manuals?
Are we going to be getting updated manual in the future with the new recommended stack?

Many thanks.

(Marcus Fong) #2

That should be:

php install/fix_requirements.php /home/websites/squiz_matrix

(assuming you’re in the /home/websites/squiz_matrix directory).

The bit where it says in /home/websites/squiz_matrix/core/include/ on line 30 is part of the PHP error, it’s not actually telling you to run the script with that file as its argument.

(Tbaatar) #3

Hi Marcus,

Thanks for the help. This worked in terms of getting all the requirements.
I did have to install git first in order for composer to work. I noticed the composer install all PEAR packages and some other 3rd party packages, and some failed such as scss.

Trying to run step2 again and now i get the following error:

Matrix appears to be owned by root, you should fix permissions.

Now, I think this could be to do with Nginex or Database. I installed Postgres 9.6 (direct from Postgres website) and for some reason it installs in the /var/lib/pgsql/9.6/data/pg_hba.confdirectory as opposed to/etc/postgresql/9.6/main/pg_hba.conf` in apache.

I’m not sure if this is causing the problem? or I need to configure something else.


Pear packages not available
(Marcus Fong) #4

I believe that error is caused by a check on the owner of data/private/conf/, which is done as part of Matrix’s initialisation (or its scripts’ initialisation). Which shouldn’t be root, as the entire data directory should be owned by whichever user you’re running mod_php or PHP-FPM as.

It’s not the database and it can’t be anything to do with Nginx, because at this point in a Matrix install the webserver software isn’t involved in any way - you’re just running scripts.

(Tbaatar) #5

Tried to have a go at installing again and it turns out PEAR server is down for 3 days now due security breach and it advices anyone who has downloaded PEAR in the last 6 months to check.

How serious is this to Squiz Matrix environment?

(John gill) #6

I’m not a native PHP-speaker, so take this with a grain of salt, but I ran into this yesterday and as far as I can tell the 5.5 Matrix releases never fetched or used the compromised file. 5.5 uses Pear packages, but it doesn’t use the Pear package manager - it gets them via composer.

I don’t know if 5.4 used composer though, so if you’ve set up a 5.4 site inside that 6 month window it’d be worth digging further.

(Tbaatar) #7

Hi John,

Thanks for the feedback.
Does this mean we can safely ignore the PEAR process of the installation and let composer pull in the necessary files? Because I was literally pulling my hairout in trying to install PEAR on Saturday (before the announcement) and I thought I was doing something wrong.

(John gill) #8

As far as I know, it’s safe to simply change the PEAR repository references in the composer.json file to their packagist equivalents.

I ended up with

   "name": "squiz/matrix",
   "description": "Squiz Matrix",
   "license": "GPL-2.0",
   "require": {
    "cebe/markdown": "^1.1",
    "james-heinrich/getid3": "1.9.15",
    "paragonie/random_compat": "^2.0",
    "pear/Archive_Tar": "^1.4",
    "pear/Console_Getopt": "^1.4",
    "pear/Mail": "^1.4",
    "pear/Mail_Mime": "^1.10",
    "pear/Mail_mime-Decode": "^1.5",
    "pear/PEAR": "^1.10",
    "pear/XML_Parser": "^1.3",
    "pixel418/markdownify": "^2.2",
    "simplesamlphp/simplesamlphp": "^1.15",
    "tubalmartin/cssmin": "^4.1",
    "lyte/serial": "^0.1",
    "leafo/scssphp": "^0.7.7"

However not every package (Text_Diff, Mail_Queue) has a direct Packagist equivalent. This seems ok for running up a dev server but I wouldn’t start any production environments with it.