1

I have compiled apache 2.4.16, php 5.6.11 and also compiled libmcrypt 2.5.7

This is done as part of a setup script which we use to set our servers up.

Both installed no problems and passed the php make test.

When I issue

$iv = mcrypt_create_iv($size, MCRYPT_DEV_URANDOM);

..apache blocks.

$iv = mcrypt_create_iv($size, MCRYPT_DEV_RANDOM);

..apache also blocks.

This typically would be down to URANDOM/RANDOM blocking.

How can I establish what is causing the block?

Running php -a (interactively) doesn't cause problems and only blocks with RANDOM.

Why would apache cause a block and running php interactively work ok?

Cheers, Tom

Tom Shaw
  • 73
  • 9
  • I don't think this is even possible ... how do you know that it's the `mcrypt_create_iv()` call that's blocking and not something else stalling execution? – Narf Aug 19 '15 at 14:23
  • possible duplicate of [\`mcrypt\_create\_iv\` Stalls, But Only Through Apache](http://stackoverflow.com/questions/31629754/mcrypt-create-iv-stalls-but-only-through-apache) – Narf Aug 19 '15 at 14:25
  • Turns out it is possible, but not due to `/dev/urandom` itself blocking ... the "duplicate" question I linked above was asked just over a week before yours. – Narf Aug 19 '15 at 14:26

0 Answers0