keenlabs / KeenClient-PHP

Official PHP client for the Keen IO API. Build analytics features directly into your PHP apps.
https://keen.io/docs
MIT License
133 stars 57 forks source link

generating a scoped api key freezes on the second try #53

Closed monbro closed 10 years ago

monbro commented 10 years ago

For known reason (https://stackoverflow.com/questions/11173803/mcrypt-dev-random-freezes-but-mcrypt-dev-urandom-works) I could not generate a scoped api key twice. My solution was to use MCRYPT_DEV_URANDOM instead of the default MCRYPT_DEV_RANDOM in https://github.com/keenlabs/KeenClient-PHP/blob/f53da8e8d5b9e550000902293531e826822ea1ef/src/KeenIO/Client/KeenIOClient.php#L265. May it would be good to add a note on that.

k-k commented 10 years ago

@monbro - thanks, had a chance to test this this morning and was able to easily reproduce the issue.

I switched the method to use MCRYPT_DEV_URANDOM by default