Fresh install - PHP 7.2.2 - Issues with install

When executing the following command:

su -s /bin/bash -c "app/Console/cake install --no-admin" apache

I get the below error:

PHP Fatal error: Cannot use ‘object’ as class name as it is reserved in lib/Cake/Core/Object.php on line 18

I have gone over the setup and made sure I didn’t leave open quotes, etc.

OS: CentOS 7.4.1708 x86_64
PHP: PHP 7.2.2 (remi repo)
Apache: 2.4.6

Hi @mgomon,

The upcoming v2 should be compatible with 7.2. Passbolt 1.x relies on Cakephp v2.9 and does not support php 7.2. In the meantime you can try running the v2-rc1: [v2.0.0-RC] Upgrade to v2 Release Candidate

Cheers,

Yes I found this out after posting this messsage :slight_smile: thanks! I am running through the install now but encountering some troubles. I will start fresh and see where I end up and post back if any issues arise.

Thanks!

@mgomon thanks for testing 7.2 support, it’s much appreciated, if you find something weird with the RC1 let us know, we’ll fix it asap.

Working with a remote database (another local server) is not working. I confirmed I could connect using the mysql command as well as telnet to the port.

$ su -s /bin/bash -c “/var/www/site.com/bin/cake passbolt install” apache
Running baseline checks, please wait…
There are some issues with the database configuration.
Please run ./app/Console/cake passbolt healthcheck for more information and help.

$ su -s /bin/bash -c “./bin/cake passbolt healthcheck” apache
Database

[FAIL] The application is not able to connect to the database.
[HELP] Double check the host, database name, username and password in config/passbolt.php
[HELP] Make sure the database exists and is accessible for the given database user.
[FAIL] No table found
[HELP] Run the install script to install the database tables
[HELP] sudo su -s /bin/bash -c “/var/www/site.com/bin/cake install” apache
[FAIL] No default content found
[HELP] Run the install script to set the default content such as roles and permission types
[HELP] sudo su -s /bin/bash -c “/var/www/site.com/bin/cake install” apache
[FAIL] The database schema is not up to date.
[HELP] Run the migration scripts:
[HELP] sudo su -s /bin/bash -c “/var/www/site.com/bin/cake migrations migrate” apache
[HELP] See. Passbolt Help | Update

Is there something special that needs to be done to access a remote database?

You can try to tweak the database section of the configuration in config/passbolt.php with information from: https://book.cakephp.org/3.0/en/orm/database-basics.html#database-configuration

Do you have any information in the /logs about why the connection is not working?

Yes I made the changes required. And from the Cake framework docs I even added some of the extra params after you sent the above link (not before).

// Database configuration.
'Datasources' => [
    'default' => [
        'className' => 'Cake\Database\Connection',
        'driver' => 'Cake\Database\Driver\Mysql',
        'persistent' => false,
        'host' => 'remote_host_ip',
        'port' => '3306',
        'username' => 'passbolt_db_user',
        'password' => 'passwd',
        'database' => 'passbolt_db',
        'encoding' => 'utf8',
        'timezone' => 'UTC',
        'cacheMetadata' => true,
    ],
],

Logs show this line each time:

2018-02-09 00:41:05 Warning: Warning (2): array_keys() expects parameter 1 to be array, null given in [/var/www/site.com/plugins/PassboltTestData/src/Shell/Task/DataTask.

Thanks

Database server was running 5.1 and I upgraded to 5.5. I think the whole server needs an upgrade but that is another story! lol.

Looks like the install is fine now that the DB server is updated.

Thanks.