[RUNKIT]Patch to add header support

From: Date: Tue, 26 Feb 2008 23:14:32 +0000
Subject: [RUNKIT]Patch to add header support
Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-5145@lists.php.net to get a copy of this message
Hello all, I make a litle patch to add the capacity to execut header() PHP function on a sanboxed environement. The call_back function for the output handler must have two parameters to work, one for the content and one for headers. Look at this example : <?php $Sandbox = new Runkit_Sandbox(); $Sandbox->header("X-Powered-By: PHP-sandoxed"); function callback($content, $headers){ foreach($headers as $header) header($header); echo($content); } runkit_sandbox_output_handler($Sandbox, "callback"); ?> I try this solution with php-cgi, works fine. Apply the patch to the last CVS version of runkit_sandbox.c . This is my first patch, please be concilient with me :) (Sorry for my poor english) Julien Mortuaire

« previous php.pecl.dev (#5145) next »