[BlueOnyx:23298] Re: Problem on initial install set up

Michael Stauber mstauber at blueonyx.it
Thu Oct 10 00:34:49 -05 2019


Hi Chuck,

> "An Error was Encountered"
> 
> "In order to use the encryption class requires that you set an
> encryption key in your config file."

CodeIgniter uses encrption for a couple of things and has a config file,
where an encryption key is stored. I don't want to ship CodeIgniter with
the same encryption key for everyone. Instead any install auto-generates
a new key that is automatically inserted into the CodeIgniter configuration.

In your case the RPM post-install script that does this must have
crapped out.

The fix:

yum reinstall base-alpine-*

That will reinstall the base-alpine RPMs (which include CodeIgniter).
And on install of that the CodeIgniter config file will receive the
proper new encryption key.

Or you can edit
/usr/sausalito/ui/chorizo/ci/application/config/config.php and find this
block_

/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| If you use the Encryption class or the Session class you
| MUST set an encryption key.  See the user guide for info.
|
*/
$config['encryption_key'] = '';

Set an encryption key there and it should work.

By default (in SVN) the 'encryption_key' is
"cf81d0da4acb2dbf276413111e8e4d48" and the POST-install of the RPM
auto-generates a new key this way and then runs sed on the config to
replace the "stock" key with the new one:

# Set random number for $config['encryption_key'] in the
# CodeIgniter config:
RANDNUMA=`/usr/bin/od -vAn -N8 -tx8 < /dev/urandom | /bin/sed -e 's/^\s//'`;
RANDNUMB=`/usr/bin/od -vAn -N8 -tx8 < /dev/urandom | /bin/sed -e 's/^\s//'`;
/bin/sed -i -e "s/cf81d0da4acb2dbf276413111e8e4d48/$RANDNUMA$RANDNUMB/"
/usr/sausalito/ui/chorizo/ci/application/config/config.php

In your case that must have wiped out the "stock" key instead.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list