Based on a question from flyingparchment via IRC I implemented an extra check to see if mcrypt is not only present but also can be initialized.
He presumably had compiled mcrypt without the --enable-dynamic-loading option.
Unfortunately I currently don't have a setup where I can test this.
I would therefore welcome any feedback on security and performance.
When committed, a specific error message might be in place.
Please post only one patch related to this issue.
I was not aware of another patch for this... could you include the tracker number?
What I mean is that the patch you posted here contains many things.
the patch
Sorry, I see now that I uploaded the wrong file.
Herman,
I also don't have a setup to test the failing case but you could merge this anyway. I don't think we need a specific error message but you could add a FAQ entry about this case.
I suggest replacing
if ($td == false) {
with
if ($td === false) {
Committed
How about this for a faq?
Q: I get the error "Cannot load mcrypt extension.", but I do have mcrypt installed.
A: Is php capable to do dynamic loading?
This can be influenced by the compile-time option "--enable-dynamic-loading" and the php.ini option "enable_dl"