APACHE_NOTE(3) 1 APACHE_NOTE(3)apache_note - Get and set apache request notesSYNOPSIS
string apache_note (string $note_name, [string $note_value = ""])
DESCRIPTION
This function is a wrapper for Apache's table_get and table_set. It edits the table of notes that exists during a request. The table's
purpose is to allow Apache modules to communicate.
The main use for apache_note(3) is to pass information from one module to another within the same request.
PARAMETERS
o $note_name
- The name of the note.
o $note_value
- The value of the note.
RETURN VALUES
If called with one argument, it returns the current value of note note_name. If called with two arguments, it sets the value of note
note_name to note_value and returns the previous value of note note_name. If the note cannot be retrieved, FALSE is returned.
EXAMPLES
Example #1
Passing information between PHP and Perl
<?php
apache_note('name', 'Fredrik Ekengren');
// Call perl script
virtual("/perl/some_script.pl");
$result = apache_note("resultdata");
?>
# Get Apache request object
my $r = Apache->request()->main();
# Get passed data
my $name = $r->notes('name');
# some processing
# Pass result back to PHP
$r->notes('resultdata', $result);
Example #2
Logging values in access.log
<?php
apache_note('sessionID', session_id());
?>
# "%{sessionID}n" can be used in the LogFormat directive
SEE ALSO virtual(3).
PHP Documentation Group APACHE_NOTE(3)
Check Out this Related Man Page
APACHE_SETENV(3) 1 APACHE_SETENV(3)apache_setenv - Set an Apache subprocess_env variableSYNOPSIS
bool apache_setenv (string $variable, string $value, [bool $walk_to_top = false])
DESCRIPTION apache_setenv(3) sets the value of the Apache environment variable specified by $variable.
Note
When setting an Apache environment variable, the corresponding $_SERVER variable is not changed.
PARAMETERS
o $variable
- The environment variable that's being set.
o $value
- The new $variable value.
o $walk_to_top
- Whether to set the top-level variable available to all Apache layers.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
Setting an Apache environment variable using apache_setenv(3)
<?php
apache_setenv("EXAMPLE_VAR", "Example Value");
?>
NOTES
Note
apache_setenv(3) can be paired up with apache_getenv(3) across separate pages or for setting variables to pass to Server Side
Includes (.shtml) that have been included in PHP scripts.
SEE ALSO apache_getenv(3).
PHP Documentation Group APACHE_SETENV(3)
I have done charts in PHP with following environment;
1) PHP 5.2.x
2) Webserver Apache 2.2.4 or higher
3) Perl 5.8.7
4) GD 2.0.1
5) JPgraph 2.1.1
It works fine in Windowx XP, Red hat linux 3.x.Now I need to move this PHP programs to AIX machine which has following environment:
PHP 4.0.6... (6 Replies)
I'm having problems opening php and perl files on Apache. The server hasn't any association with those type of files by default and a window asking to choose a program to open them popups from the browser. How can I do to process them with the browser
Thanks in advance. (1 Reply)
I'm trying to find or create a Perl script that:
Checks for and creates these files:
notes
notes.1
notes.2
notes.3
notes.4
The first represents the current log file and the others are older versions. Each time the script runs it would check for the existence of notes.3 and, if it exists,... (3 Replies)
Hello,
I am trying to compile PHP 5.3.5 on AIX 5.2 with Apache 2.2.17 and Mysql 3.23.58
Apache und Mysql are working fine but if i try to compile PHP i get this error:
with make:
sapi/apache2handler/php_functions.lo main/internal_functions.lo -lmysqlclient -lfreetype -lX11 -lXpm -lpng -lz... (2 Replies)
I am currently trying to do a PHP script that detects automatically if Apache Splunk authentication is required or not but I'm having a hard time since HTTP code 303 is always coming back, even if auth is required or not.
Here is the script so far;
<?php
/**
* Apache Splunk script to... (4 Replies)