Install error on step 2


(Shree Guru Sewak) #1

Hi all,
I’m trying to install the Squiz on my local ubantu VM and getting the below error. Not finding any options to resolve this so posting to this forum so if anyone has had this, please share how to resolve this,

root@sysadmin-VirtualBox:/var/www/squiz_matrix# su - squiz -c “cd /var/www/squiz_matrix; php install/step_02.php /var/www/squiz_matrix”
Fatal error: Uncaught exception ‘Exception’ with message: 'Could not create database connection: DBError!:could not find driverroot@sysadmin-VirtualBox:/var/www/squiz_matrix#


(Tbaatar) #2

Why don’t you just get the Matrix VM if you plan on running locally?


(Shree Guru Sewak) #3

I wanted to practice before installing on our production server.


(Tbaatar) #4

Alright, for the step 2 and step 3 you have to run the installation as the root user (www-data). On Debain/Ubuntu with apache it looks like this:

sudo -u www-data php install/step_02.php /var/www/squiz_matrix

However the error seems to indicate DB error. Which database / version did you try to install?

I have always found PostgreSQL 9.4 or 9.6 to install perfectly, anything after that there is extra configuration.


(Shree Guru Sewak) #5

It is PostgreSQL 10.0 and the install was without any errors. When using psql, I can connect to the database successfully.

All the files and directories are owned by the user squiz and the step_02.php is being run as that user like you have mentioned above. Should that be changed to www-data?


(John gill) #6

Looks like your PHP setup is missing pgsql support.


(Shree Guru Sewak) #7

This error went away after updating the drivers for PHP as suggested but then it failed on step 3 saying that the installation had some remnants from a previous install.

So I removed the install, dropped the database and started over again. Now on the step 2 I get the below error.

/var/www/squiz_matrix$ php install/step_02.php /var/www/squiz_matrix
Fatal error: Uncaught exception ‘Exception’ with message: 'Could not create database connection: DBError!:invalid data source name

The db_inc file has all the definitions in there. What could be missing here?


(John gill) #8

That error indicates you have a problem in the DSN part of your db.inc. This is just a basic PDO connection string, it isn’t Matrix specific.

If postgres is on the same server as PHP-FPM, then you shouldn’t need anything more than the DSN used in Squiz’s test virtual machine

'DSN' => 'pgsql:dbname=matrix',


(Shree Guru Sewak) #9

That is what I have in the file. Below is the db-inc. In my case, everything is on the same vm.

<?php $db_conf = array ( 'db' => array ( 'DSN' => 'pgsql:dbname=squiz_matrix', 'user' => 'matrix', 'password' => '', 'type' => 'pgsql', ), 'db2' => array ( 'DSN' => 'pgsql:dbname=squiz_matrix', 'user' => 'matrix', 'password' => '', 'type' => 'pgsql', ), 'db3' => array ( 'DSN' => 'pgsql:dbname=squiz_matrix', 'user' => 'matrix_secondary', 'password' => '', 'type' => 'pgsql', ), 'dbcache' => array ( 'DSN' => 'pgsql:dbname=squiz_matrix', 'user' => 'matrix', 'password' => '', 'type' => 'pgsql', ), 'dbsearch' => NULL, ); return $db_conf; ?>