note 14252 deleted from function.apache-note by didou

From: Date: Mon, 31 Dec 2007 00:17:43 +0000
Subject: note 14252 deleted from function.apache-note by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-134567@lists.php.net to get a copy of this message
Note Submitter: fredrik dot ekengren at mandarinen dot se ---- In a project I was involved in, we needed to pass data from mod_php4 to mod_perl. We used apache_note() to do the work for us. It took a little while to figure it out, but here's some sample code that could help anyone with the same problem. From PHP file: <? apache_note("name", $HTTP_COOKIE_VARS["User"]); // Put all post variables into apache notes while (list($key,$value) = each($HTTP_POST_VARS)) apache_note($key, $value); // Call perl script virtual("/perl/some_script.pl"); $result = apache_note("resultdata"); ?> From Perl file: # Get Apache request object my $r = Apache->request()->main(); # Get passed data my $name = $r->notes('name'); my $more_data = $r->notes('more_data'); # some processing # Pass result back to PHP $r->notes('resultdata', $result); // Fredrik

« previous php.notes (#134567) next »