note 94373 modified in ref.mcrypt by danbrown
| From: | danbrown@php.net | Date: | Mon, 13 Dec 2010 16:21:49 +0000 |
| Subject: | note 94373 modified in ref.mcrypt by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-174852@lists.php.net to get a copy of this message | ||
mcrypt module initialization failed
I found this circumstance:
usemcrypt.php:
<?php
function protect() {
//some mcrypt/decrypt command
}
?>
filea.php:
<?php
include_once('usemcrypt.php');
function a() {
protect();
} ?>
fileb.php
<?php
function b() {
include_once('usemcrypt.php');
protect();
}
?>
filea.php and a() work fine
fileb.php and b() will report a mcrypt module initialization failed
I am assuming you can't pull that module in on the fly. If you use a file that calls mcrypt, it
has to be included at the head, not in a function.
--was--
mcrypt module initialization failed
I found this circumstance:
usemcrypt.php:
<?php
function protect() {
//some mcrypt/decrypt command
}
?>
filea.php:
<?php
include_once('usemcrypt.php');
function a() {
protect();
} ?>
fileb.php
<?
function b() {
include_once('usemcrypt.php');
protect();
}
?>
filea.php and a() work fine
fileb.php and b() will report a mcrypt module initialization failed
I am assuming you can't pull that module in on the fly. If you use a file that calls mcrypt, it
has to be included at the head, not in a function.
http://php.net/manual/en/ref.mcrypt.php