note 94373 added to ref.mcrypt

From: Date: Sat, 31 Oct 2009 05:42:39 +0000
Subject: note 94373 added to ref.mcrypt
Groups: php.notes 
Request: Send a blank email to php-notes+get-162300@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 <? 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. ---- Server IP: 69.147.83.197 Probable Submitter: 99.27.175.109 ---- Manual Page -- http://www.php.net/manual/en/ref.mcrypt.php Edit -- https://master.php.net/note/edit/94373 Del: integrated -- https://master.php.net/note/delete/94373/integrated Del: useless -- https://master.php.net/note/delete/94373/useless Del: bad code -- https://master.php.net/note/delete/94373/bad+code Del: spam -- https://master.php.net/note/delete/94373/spam Del: non-english -- https://master.php.net/note/delete/94373/non-english Del: in docs -- https://master.php.net/note/delete/94373/in+docs Del: other reasons-- https://master.php.net/note/delete/94373 Reject -- https://master.php.net/note/reject/94373 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#162300) next »