straup / privatesquare

privatesquare is a simple web application to record and manage a database of foursquare check-ins.
http://straup.github.com/privatesquare/
BSD 2-Clause "Simplified" License
59 stars 16 forks source link

generate_secret.php - how to do this locally? #19

Closed robertocarroll closed 10 years ago

robertocarroll commented 10 years ago

I'm trying to generate the encryption secrets and I don't have remote shell access. When I run:

$ php bin/generate_secret.php

locally, I get:

Notice: Use of undefined constant MCRYPT_RIJNDAEL_256 - assumed 'MCRYPT_RIJNDAEL_256' in /Applications/MAMP/htdocs/privatesquare-2.01/www/include/lib_crypto_mcrypt.php on line 9 You must set cfg.crypto_password_secret unless you use bcrypt (without auto-promotion)

Any idea how I can fix this? Thanks.

robertocarroll commented 10 years ago

So:

  1. I needed Mcrypt installed which I downloaded from here: http://topicdesk.com/downloads/mcrypt/mcrypt-download
  2. I needed extension=mcrypt.so in php.ini (I think this made a difference?)
  3. Each of the secrets in config.php needed a value to generate the secret value.

All working now. Cheers!