note 14252 modified in function.apache-note by alindeman
| From: | alindeman@php.net | Date: | Sat, 03 May 2003 20:48:01 +0000 |
| Subject: | note 14252 modified in function.apache-note by alindeman | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-47457@lists.php.net to get a copy of this message | ||
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
--was--
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
http://www.php.net/manual/en/function.apache-note.php