mfischer Sun Jun 16 03:11:04 2002 EDT
Modified files:
/phpdoc/en/appendices migration4.xml
/phpdoc/en/chapters security.xml
/phpdoc/en/faq using.xml
/phpdoc/en/features file-upload.xml remote-files.xml
/phpdoc/en/language variables.xml
/phpdoc/en/reference/array/functions each.xml
/phpdoc/en/reference/cybermut/functions cybermut-testmac.xml
/phpdoc/en/reference/funchand/functions call-user-func-array.xml
/phpdoc/en/reference/http/functions setcookie.xml
/phpdoc/en/reference/session/functions session-is-registered.xml
session-register.xml
session-unregister.xml
/phpdoc/en/reference/var/functions get-defined-vars.xml
Log:
- Use new superglobals by default, mention old way were applicable.
Index: phpdoc/en/appendices/migration4.xml
diff -u phpdoc/en/appendices/migration4.xml:1.23
phpdoc/en/appendices/migration4.xml:1.24
--- phpdoc/en/appendices/migration4.xml:1.23 Thu Mar 28 12:16:34 2002
+++ phpdoc/en/appendices/migration4.xml Sun Jun 16 03:10:59 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.23 $ -->
+<!-- $Revision: 1.24 $ -->
<appendix id="migration4">
<title>Migrating from PHP 3 to PHP 4</title>
@@ -261,8 +261,8 @@
that makes your script give him access rights he wasn't intended
to have. So PHP 4 will now warn you whenever you use unquoted
string constants as for example in
- <literal>$HTTP_SERVER_VARS[REQUEST_METHOD]</literal>. Changing it
- to <literal>$HTTP_SERVER_VARS['REQUEST_METHOD']</literal> will
+ <literal>$_SERVER[REQUEST_METHOD]</literal>. Changing it
+ to <literal>$_SERVER['REQUEST_METHOD']</literal> will
make the parser happy and greatly improve the style and security
of your code.
</para>
Index: phpdoc/en/chapters/security.xml
diff -u phpdoc/en/chapters/security.xml:1.47 phpdoc/en/chapters/security.xml:1.48
--- phpdoc/en/chapters/security.xml:1.47 Thu Mar 28 12:16:36 2002
+++ phpdoc/en/chapters/security.xml Sun Jun 16 03:11:00 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.47 $ -->
+<!-- $Revision: 1.48 $ -->
<chapter id="security">
<title>Security</title>
@@ -384,7 +384,7 @@
<![CDATA[
<?php
// remove a file from the user's home directory
-$username = $HTTP_POST_VARS['user_submitted_name'];
+$username = $_POST['user_submitted_name'];
$homedir = "/home/$username";
$file_to_delete = "$userfile";
unlink ($homedir/$userfile);
@@ -436,7 +436,7 @@
<?php
// removes a file from the hard drive that
// the PHP user has access to.
-$username = $HTTP_SERVER_VARS['REMOTE_USER']; // using an authentication mechanisim
+$username = $_SERVER['REMOTE_USER']; // using an authentication mechanisim
$homedir = "/home/$username";
@@ -462,7 +462,7 @@
<programlisting role="php">
<![CDATA[
<?php
-$username = $HTTP_SERVER_VARS['REMOTE_USER']; // using an authentication mechanisim
+$username = $_SERVER['REMOTE_USER']; // using an authentication mechanisim
$homedir = "/home/$username";
if (!ereg('^[^./][^/]*$', $userfile))
@@ -1057,7 +1057,7 @@
<programlisting role="php">
<![CDATA[
<?php
-if($HTTP_COOKIE_VARS['username']){
+if($_COOKIE['username']){
// can only come from a cookie, forged or otherwise
$good_login = 1;
fpassthru ("/highly/sensitive/data/index.html");
@@ -1078,14 +1078,14 @@
<programlisting role="php">
<![CDATA[
<?php
-if ($HTTP_COOKIE_VARS['username'] &&
- !$HTTP_POST_VARS['username'] &&
- !$HTTP_GET_VARS['username'] ) {
+if ($_COOKIE['username'] &&
+ !$_POST['username'] &&
+ !$_GET['username'] ) {
// Perform other checks to validate the user name...
$good_login = 1;
fpassthru ("/highly/sensitive/data/index.html");
} else {
- mail("[EMAIL PROTECTED]", "Possible breakin attempt",
$HTTP_SERVER_VARS['REMOTE_ADDR']);
+ mail("[EMAIL PROTECTED]", "Possible breakin attempt", $_SERVER['REMOTE_ADDR']);
echo "Security violation, admin has been alerted.";
exit;
}
Index: phpdoc/en/faq/using.xml
diff -u phpdoc/en/faq/using.xml:1.18 phpdoc/en/faq/using.xml:1.19
--- phpdoc/en/faq/using.xml:1.18 Mon May 6 06:46:41 2002
+++ phpdoc/en/faq/using.xml Sun Jun 16 03:11:00 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.18 $ -->
+<!-- $Revision: 1.19 $ -->
<chapter id="faq.using">
<title>Using PHP</title>
<titleabbrev>Using PHP</titleabbrev>
@@ -24,12 +24,14 @@
file. Since PHP 4.0.3, this feature is always on. When
<literal>track_vars</literal> is on, it creates some
associative arrays, the most important here is:
- <literal>$HTTP_POST_VARS</literal>. So, to write a generic
+ <literal>$_POST</literal> (this used to be called
+ <literal>$HTTP_POST_VARS</literal> in <literal>PHP</literal> versions
+ prior 4.1.0). So, to write a generic
script to handle POST method variables you would
need something similar to the following:
<programlisting role="php">
<![CDATA[
-foreach ($HTTP_POST_VARS as $var => $value) {
+foreach ($_POST as $var => $value) {
echo "$var = $value<br>\n";
}
]]>
Index: phpdoc/en/features/file-upload.xml
diff -u phpdoc/en/features/file-upload.xml:1.38 phpdoc/en/features/file-upload.xml:1.39
--- phpdoc/en/features/file-upload.xml:1.38 Tue May 28 15:04:20 2002
+++ phpdoc/en/features/file-upload.xml Sun Jun 16 03:11:00 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.38 $ -->
+<!-- $Revision: 1.39 $ -->
<chapter id="features.file-upload">
<title>Handling file uploads</title>
@@ -75,12 +75,12 @@
</para>
<para>
- The contents of <varname>$HTTP_POST_FILES</varname> are as
+ The contents of <varname>$_FILES</varname> are as
follows. Note that this assumes the use of the file upload name
'userfile', as used in the example script above:
<variablelist>
<varlistentry>
- <term><varname>$HTTP_POST_FILES['userfile']['name']</varname></term>
+ <term><varname>$_FILES['userfile']['name']</varname></term>
<listitem>
<para>
The original name of the file on the client machine.
@@ -88,7 +88,7 @@
</listitem>
</varlistentry>
<varlistentry>
- <term><varname>$HTTP_POST_FILES['userfile']['type']</varname></term>
+ <term><varname>$_FILES['userfile']['type']</varname></term>
<listitem>
<para>
The mime type of the file, if the browser provided this
@@ -98,7 +98,7 @@
</listitem>
</varlistentry>
<varlistentry>
- <term><varname>$HTTP_POST_FILES['userfile']['size']</varname></term>
+ <term><varname>$_FILES['userfile']['size']</varname></term>
<listitem>
<para>
The size, in bytes, of the uploaded file.
@@ -106,7 +106,7 @@
</listitem>
</varlistentry>
<varlistentry>
- <term><varname>$HTTP_POST_FILES['userfile']['tmp_name']</varname></term>
+ <term><varname>$_FILES['userfile']['tmp_name']</varname></term>
<listitem>
<para>
The temporary filename of the file in which the uploaded file
@@ -118,9 +118,9 @@
</para>
<note>
<para>
- PHP 4.1.0 or later supports a short track variable
- <varname>$_FILES</varname>. PHP 3 does not support
- <varname>$HTTP_POST_FILES</varname>.
+ In PHP versions prior 4.1.0 this was named
+ <varname>$HTTP_POST_VARS</varname> and was not an autoglobal variable.
+ PHP 3 does not support <varname>$HTTP_POST_FILES</varname>.
</para>
</note>
@@ -191,14 +191,14 @@
<programlisting role="php">
<![CDATA[
<?php
-// In PHP 4.1.0 or later, $_FILES should be used instead of $HTTP_POST_FILES.
-if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) {
- copy($HTTP_POST_FILES['userfile']['tmp_name'], "/place/to/put/uploaded/file");
+// In PHP earlier then 4.1.0, $HTTP_POST_FILES should be used instead of $_FILES.
+if (is_uploaded_file($_FILES['userfile']['tmp_name'])) {
+ copy($_FILES['userfile']['tmp_name'], "/place/to/put/uploaded/file");
} else {
- echo "Possible file upload attack. Filename: " .
$HTTP_POST_FILES['userfile']['name'];
+ echo "Possible file upload attack. Filename: " . $_FILES['userfile']['name'];
}
/* ...or... */
-move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'],
"/place/to/put/uploaded/file");
+move_uploaded_file($_FILES['userfile']['tmp_name'], "/place/to/put/uploaded/file");
?>
]]>
</programlisting>
@@ -208,10 +208,10 @@
The PHP script which receives the uploaded file should implement
whatever logic is necessary for determining what should be done
with the uploaded file. You can for example use the
- <varname>$HTTP_POST_FILES['userfile']['size']</varname> variable
+ <varname>$_FILES['userfile']['size']</varname> variable
to throw away any files that are either too small or too big. You
could use the
- <varname>$HTTP_POST_FILES['userfile']['type']</varname> variable
+ <varname>$_FILES['userfile']['type']</varname> variable
to throw away any files that didn't match a certain type criteria.
Whatever the logic, you should either delete the file from the
temporary directory or move it elsewhere.
@@ -293,11 +293,12 @@
</para>
<simpara>
When the above form is submitted, the arrays
- <varname>$HTTP_POST_FILES['userfile']</varname>,
- <varname>$HTTP_POST_FILES['userfile']['name']</varname>, and
- <varname>$HTTP_POST_FILES['userfile']['size']</varname> will be
- initialized. (As well as in $_FILES for PHP 4.1.0 or
- later. $HTTP_POST_VARS in PHP 3. When
+ <varname>$_FILES['userfile']</varname>,
+ <varname>$_FILES['userfile']['name']</varname>, and
+ <varname>$_FILES['userfile']['size']</varname> will be
+ initialized (as well as in $HTTP_POST_FILES for PHP version
+ prior 4.1.0).
+ When
<literal>register_globals</literal> is on, globals for uploaded
files are also initialized). Each of these will be a numerically
indexed array of the appropriate values for the submitted files.
@@ -306,18 +307,18 @@
For instance, assume that the filenames
<filename>/home/test/review.html</filename> and
<filename>/home/test/xwp.out</filename> are submitted. In this
- case, <varname>$HTTP_POST_FILES['userfile']['name'][0]</varname>
+ case, <varname>$_FILES['userfile']['name'][0]</varname>
would contain the value <filename>review.html</filename>, and
- <varname>$HTTP_POST_FILES['userfile']['name'][1]</varname> would
+ <varname>$_FILES['userfile']['name'][1]</varname> would
contain the value <filename>xwp.out</filename>. Similarly,
- <varname>$HTTP_POST_FILES['userfile']['size'][0]</varname> would
+ <varname>$_FILES['userfile']['size'][0]</varname> would
contain <filename>review.html</filename>'s filesize, and so forth.
</simpara>
<simpara>
- <varname>$HTTP_POST_FILES['userfile']['name'][0]</varname>,
- <varname>$HTTP_POST_FILES['userfile']['tmp_name'][0]</varname>,
- <varname>$HTTP_POST_FILES['userfile']['size'][0]</varname>, and
- <varname>$HTTP_POST_FILES['userfile']['type'][0]</varname> are
+ <varname>$_FILES['userfile']['name'][0]</varname>,
+ <varname>$_FILES['userfile']['tmp_name'][0]</varname>,
+ <varname>$_FILES['userfile']['size'][0]</varname>, and
+ <varname>$_FILES['userfile']['type'][0]</varname> are
also set.
</simpara>
</sect1>
Index: phpdoc/en/features/remote-files.xml
diff -u phpdoc/en/features/remote-files.xml:1.17
phpdoc/en/features/remote-files.xml:1.18
--- phpdoc/en/features/remote-files.xml:1.17 Mon Jun 10 17:41:15 2002
+++ phpdoc/en/features/remote-files.xml Sun Jun 16 03:11:01 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.17 $ -->
+<!-- $Revision: 1.18 $ -->
<chapter id="features.remote-files">
<title>Using remote files</title>
@@ -75,7 +75,7 @@
exit;
}
/* Write the data here. */
-fputs ($file, $HTTP_SERVER_VARS['HTTP_USER_AGENT'] . "\n");
+fputs ($file, $_SERVER['HTTP_USER_AGENT'] . "\n");
fclose ($file);
?>
]]>
Index: phpdoc/en/language/variables.xml
diff -u phpdoc/en/language/variables.xml:1.48 phpdoc/en/language/variables.xml:1.49
--- phpdoc/en/language/variables.xml:1.48 Mon Jun 10 05:50:04 2002
+++ phpdoc/en/language/variables.xml Sun Jun 16 03:11:01 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.48 $ -->
+<!-- $Revision: 1.49 $ -->
<chapter id="language.variables">
<title>Variables</title>
@@ -661,9 +661,9 @@
PHP. If the <link linkend="ini.track-vars">track_vars</link>
configuration option is turned on, then these variables will be
located in the associative arrays
- <varname>$HTTP_POST_VARS</varname>,
- <varname>$HTTP_GET_VARS</varname>, and/or
- <varname>$HTTP_POST_FILES</varname>, according to the
+ <varname>$_POST</varname>,
+ <varname>$_GET</varname>, and/or
+ <varname>$_FILES</varname>, according to the
source of the variable in question.
</simpara>
@@ -690,7 +690,7 @@
<para>
When the above form is submitted, the value from the text input
will be available in
- <varname>$HTTP_POST_VARS['username']</varname>. If the <link
+ <varname>$_POST['username']</varname>. If the <link
linkend="ini.register-globals">register_globals</link>
configuration directive is turned on, then the variable will also
be available as <varname>$username</varname> in the global scope.
Index: phpdoc/en/reference/array/functions/each.xml
diff -u phpdoc/en/reference/array/functions/each.xml:1.5
phpdoc/en/reference/array/functions/each.xml:1.6
--- phpdoc/en/reference/array/functions/each.xml:1.5 Sun May 12 04:19:28 2002
+++ phpdoc/en/reference/array/functions/each.xml Sun Jun 16 03:11:02 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.each">
<refnamediv>
@@ -71,18 +71,18 @@
<para>
<function>each</function> is typically used in conjunction with
<function>list</function> to traverse an array; for instance,
- <varname>$HTTP_POST_VARS</varname>:
+ <varname>$_POST</varname>:
<example>
<title>
- Traversing <varname>$HTTP_POST_VARS</varname> with
+ Traversing <varname>$_POST</varname> with
<function>each</function>
</title>
<programlisting role="php">
<![CDATA[
-echo "Values submitted via POST method:<br>";
-reset ($HTTP_POST_VARS);
-while (list ($key, $val) = each ($HTTP_POST_VARS)) {
- echo "$key => $val<br>";
+echo "Values submitted via POST method:<br />\n";
+reset ($_POST);
+while (list ($key, $val) = each ($_POST)) {
+ echo "$key => $val<br />\n";
}
]]>
</programlisting>
Index: phpdoc/en/reference/cybermut/functions/cybermut-testmac.xml
diff -u phpdoc/en/reference/cybermut/functions/cybermut-testmac.xml:1.2
phpdoc/en/reference/cybermut/functions/cybermut-testmac.xml:1.3
--- phpdoc/en/reference/cybermut/functions/cybermut-testmac.xml:1.2 Wed Apr 17
02:37:07 2002
+++ phpdoc/en/reference/cybermut/functions/cybermut-testmac.xml Sun Jun 16 03:11:02
+2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/cybermut.xml, last change in rev 1.1 -->
<refentry id="function.cybermut-testmac">
<refnamediv>
@@ -31,8 +31,8 @@
<programlisting role="php">
<![CDATA[
<?php
- $code_retour=$HTTP_GET_VARS["code-retour"];
- $texte_libre=$HTTP_GET_VARS["texte-libre"];
+ $code_retour = $_GET["code-retour"];
+ $texte_libre = $_GET["texte-libre"];
?>
]]>
</programlisting>
@@ -49,8 +49,8 @@
// Version number
$VERSION="1.2";
-$texte_libre = $HTTP_GET_VARS["texte-libre"];
-$code_retour = $HTTP_GET_VARS["code-retour"];
+$texte_libre = $_GET["texte-libre"];
+$code_retour = $_GET["code-retour"];
$mac_ok =
cybermut_testmac($MAC,$VERSION,$TPE,$date,$montant,$reference,$texte_libre,$code_retour);
Index: phpdoc/en/reference/funchand/functions/call-user-func-array.xml
diff -u phpdoc/en/reference/funchand/functions/call-user-func-array.xml:1.2
phpdoc/en/reference/funchand/functions/call-user-func-array.xml:1.3
--- phpdoc/en/reference/funchand/functions/call-user-func-array.xml:1.2 Wed Apr 17
02:38:17 2002
+++ phpdoc/en/reference/funchand/functions/call-user-func-array.xml Sun Jun 16
+03:11:03 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/funchand.xml, last change in rev 1.10 -->
<refentry id="function.call-user-func-array">
<refnamediv>
@@ -33,11 +33,11 @@
}
$c = mysql_connect();
-$host = $HTTP_SERVER_VARS["SERVER_NAME"];
+$host = $_SERVER["SERVER_NAME"];
call_user_func_array ('debug', array("host", $host));
call_user_func_array ('debug', array("c", $c));
-call_user_func_array ('debug', array("HTTP_POST_VARS", $HTTP_POST_VARS));
+call_user_func_array ('debug', array("_POST", $_POST));
]]>
</programlisting>
</informalexample>
Index: phpdoc/en/reference/http/functions/setcookie.xml
diff -u phpdoc/en/reference/http/functions/setcookie.xml:1.2
phpdoc/en/reference/http/functions/setcookie.xml:1.3
--- phpdoc/en/reference/http/functions/setcookie.xml:1.2 Wed Apr 17 02:38:28
2002
+++ phpdoc/en/reference/http/functions/setcookie.xml Sun Jun 16 03:11:03 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/http.xml, last change in rev 1.2 -->
<refentry id="function.setcookie">
<refnamediv>
@@ -42,6 +42,11 @@
only be transmitted over a secure HTTPS connection.
</para>
<para>
+ Once the cookies have been set they can be accessed on the next page load
+ with the <varname>$_COOKIE</varname> array (which used to be called
+ <varname>$HTTP_COOKIE_VARS</varname> in PHP versions prior to 4.1.0).
+ </para>
+ <para>
Common Pitfalls:
<itemizedlist>
<listitem>
@@ -102,7 +107,7 @@
<programlisting role="php">
<![CDATA[
echo $TestCookie;
-echo $HTTP_COOKIE_VARS["TestCookie"];
+echo $_COOKIE["TestCookie"];
]]>
</programlisting>
</informalexample>
Index: phpdoc/en/reference/session/functions/session-is-registered.xml
diff -u phpdoc/en/reference/session/functions/session-is-registered.xml:1.2
phpdoc/en/reference/session/functions/session-is-registered.xml:1.3
--- phpdoc/en/reference/session/functions/session-is-registered.xml:1.2 Wed Apr 17
02:43:58 2002
+++ phpdoc/en/reference/session/functions/session-is-registered.xml Sun Jun 16
+03:11:03 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/session.xml, last change in rev 1.8 -->
<refentry id="function.session-is-registered">
<refnamediv>
@@ -30,7 +30,7 @@
<caution>
<para>
If you are using
- <varname>$HTTP_SESSION_VARS</varname>/<varname>$_SESSION</varname>,
+ <varname>$_SESSION</varname> (or <varname>$HTTP_SESSION_VARS</varname>),
do not use <function>session_register</function>,
<function>session_is_registered</function> and
<function>session_unregister</function>.
Index: phpdoc/en/reference/session/functions/session-register.xml
diff -u phpdoc/en/reference/session/functions/session-register.xml:1.3
phpdoc/en/reference/session/functions/session-register.xml:1.4
--- phpdoc/en/reference/session/functions/session-register.xml:1.3 Mon May 27
06:20:18 2002
+++ phpdoc/en/reference/session/functions/session-register.xml Sun Jun 16 03:11:03
+2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/session.xml, last change in rev 1.2 -->
<refentry id="function.session-register">
<refnamediv>
@@ -33,7 +33,7 @@
<caution>
<para>
If you are using
- <varname>$HTTP_SESSION_VARS</varname>/<varname>$_SESSION</varname>,
+ <varname>$_SESSION</varname> (or <varname>$HTTP_SESSION_VARS</varname>),
do not use <function>session_register</function>,
<function>session_is_registered</function> and
<function>session_unregister</function>.
@@ -50,18 +50,18 @@
</para>
<para>
You can also create a session variable by simply setting the
- appropriate member of the <varname>$HTTP_SESSION_VARS</varname>
- or <varname>$_SESSION</varname> (PHP >= 4.1.0) array.
+ appropriate member of the <varname>$_SESSION</varname>
+ or <varname>$HTTP_SESSION_VARS</varname> (PHP < 4.1.0) array.
<informalexample>
<programlisting role="php">
<![CDATA[
$barney = "A big purple dinosaur.";
session_register("barney");
-$HTTP_SESSION_VARS["zim"] = "An invader from another planet.";
+$_SESSION["zim"] = "An invader from another planet.";
-# the auto-global $_SESSION array was introduced in PHP 4.1.0
-$_SESSION["spongebob"] = "He's got square pants.";
+# The old way was to use $HTTP_SESSION_VARS
+$HTTP_SESSION_VARS["spongebob"] = "He's got square pants.";
]]>
</programlisting>
</informalexample>
Index: phpdoc/en/reference/session/functions/session-unregister.xml
diff -u phpdoc/en/reference/session/functions/session-unregister.xml:1.2
phpdoc/en/reference/session/functions/session-unregister.xml:1.3
--- phpdoc/en/reference/session/functions/session-unregister.xml:1.2 Wed Apr 17
02:44:00 2002
+++ phpdoc/en/reference/session/functions/session-unregister.xml Sun Jun 16
+03:11:03 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/session.xml, last change in rev 1.2 -->
<refentry id="function.session-unregister">
<refnamediv>
@@ -42,7 +42,7 @@
<caution>
<para>
If you are using
- <varname>$HTTP_SESSION_VARS</varname>/<varname>$_SESSION</varname>,
+ <varname>$_SESSION</varname> (or <varname>$HTTP_SESSION_VARS</varname>),
do not use <function>session_register</function>,
<function>session_is_registered</function> and
<function>session_unregister</function>.
Index: phpdoc/en/reference/var/functions/get-defined-vars.xml
diff -u phpdoc/en/reference/var/functions/get-defined-vars.xml:1.2
phpdoc/en/reference/var/functions/get-defined-vars.xml:1.3
--- phpdoc/en/reference/var/functions/get-defined-vars.xml:1.2 Wed Apr 17 02:44:56
2002
+++ phpdoc/en/reference/var/functions/get-defined-vars.xml Sun Jun 16 03:11:04
+2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/var.xml, last change in rev 1.34 -->
<refentry id="function.get-defined-vars">
<refnamediv>
@@ -36,7 +36,7 @@
print_r($arr["argv"]);
// print all the server vars
-print_r($arr["HTTP_SERVER_VARS"]);
+print_r($arr["_SERVER"]);
// print all the available keys for the arrays of variables
print_r(array_keys(get_defined_vars()));