<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1019362" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1019362</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/forcing-global-variables#comment-1115891</link>
    <description> &lt;p&gt;Sorry for the delay in reply, my friend was away on business.&lt;br /&gt;
Mark, we tryed the above code (session is missing the underscore) worked on some but not others so have decided to go back to PHP 4.0.6 on his home machine (was what it was before he updated) while his web host is using 4.1.2&lt;/p&gt;
&lt;p&gt;Thanks again guys&lt;/p&gt;
 </description>
     <pubDate>Sat, 12 Oct 2002 23:21:07 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1115891 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/forcing-global-variables#comment-1115544</link>
    <description> &lt;p&gt;register_globals can only be changed with php_admin_flag&lt;/p&gt;
&lt;p&gt;the syntax is:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;php_flag register_globals On&lt;br /&gt;php_value include_path /path/to/html:/path/to/something/else:/and/another/path&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;To unset everything, try this:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;$tmp &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= array(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_COOKIE&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_ENV&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_FILES&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_GET&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_REQUEST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_SERVER&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$SESSION&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;foreach (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$tmp &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;as &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$tmp2&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$tmp2 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;as &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$var&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$val&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; unset(${&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$var&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;});&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;unset(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$tmp2&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;unset(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$tmp&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 07 Oct 2002 04:51:57 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1115544 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/forcing-global-variables#comment-1115527</link>
    <description> &lt;p&gt;Mark, I tried it on my PC, turned globals and magic quotes on (to suit friends home php.ini) the variable thing worked on mine but things like sessions and forms didn&#039;t.&lt;br /&gt;
&lt;blockquote class=&quot;bb-quote-body&quot;&gt;Quote: php_flag and php_value are allowed in both httpd.conf and .htaccess &lt;/blockquote&gt;&lt;/p&gt;
&lt;p&gt;How would I go about trying these;&lt;br /&gt;
php_flag=0 or php_flag=off ?&lt;/p&gt;
&lt;p&gt;How about forcing the globals on then, so he can write code on 4.2.3 to suit 4.1.2&lt;br /&gt;
I know security is an issue with them on but info wise he hasn&#039;t got anything worth while to anyone and using one form for emailing (that I know of, told me about)&lt;/p&gt;
 </description>
     <pubDate>Sun, 06 Oct 2002 20:32:15 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1115527 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/forcing-global-variables#comment-1115519</link>
    <description> &lt;p&gt;php_admin_flag and php_admin_value are only allowed in the httpd.conf file&lt;/p&gt;
&lt;p&gt;php_flag and php_value are allowed in both httpd.conf and .htaccess&lt;/p&gt;
 </description>
     <pubDate>Sun, 06 Oct 2002 19:26:05 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1115519 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/forcing-global-variables#comment-1115506</link>
    <description> &lt;p&gt;I _think_ you can put &lt;strong&gt;php_admin_value register_globals Off&lt;/strong&gt; in .htaccess or httpd.conf to turn register_globals off for a specific site.&lt;/p&gt;
 </description>
     <pubDate>Sun, 06 Oct 2002 09:22:02 +0000</pubDate>
 <dc:creator>zollet</dc:creator>
 <guid isPermaLink="false">comment 1115506 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/forcing-global-variables#comment-1115500</link>
    <description> &lt;p&gt;The value of $_GET[&quot;id&quot;] (and the global $id) was initially 200.  But the code did unset the value of the global $id variable.  Looks to me like the snippet is working.&lt;/p&gt;
&lt;p&gt;I&#039;m not sure what your talking about.  I&#039;m guessing you expected it to be 1?  I have no idea why $id was initially 200.&lt;/p&gt;
 </description>
     <pubDate>Sun, 06 Oct 2002 07:50:06 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1115500 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/forcing-global-variables#comment-1115498</link>
    <description> &lt;p&gt;comes up with&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;pre&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&lt;br /&gt;Array&lt;br /&gt;(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;] =&amp;gt; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;200&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&lt;br /&gt;Array&lt;br /&gt;(&lt;br /&gt;)&lt;br /&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;hr&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;unsetting $id&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;hr&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$id &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;br /&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;pre&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;the &lt;strong&gt;  [id] =&amp;gt; 200 &lt;/strong&gt; should equal 1, then increment and next be 2 ... but since it wont pass values onto the other page it&#039;s says at 1&lt;/p&gt;
 </description>
     <pubDate>Sun, 06 Oct 2002 07:11:16 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1115498 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/forcing-global-variables#comment-1115497</link>
    <description> &lt;p&gt;We&#039;ll, I&#039;ve got mine stuck to off, so I can&#039;t test this script.  But give this a try:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;echo \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&amp;lt;pre&amp;gt;\n\&quot;;&lt;br /&gt;&lt;br /&gt;print_r(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_GET&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;print_r(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&lt;br /&gt;echo \&quot;&amp;lt;hr&amp;gt;\n\&quot;;&lt;br /&gt;&lt;br /&gt;foreach (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_GET&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; as &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$var&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$val&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo \&quot;unsetting \$&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$var&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\n\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$var&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = NULL;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; unset(&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$var&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;}&lt;br /&gt;foreach (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; as &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$var&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$val&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo \&quot;unsetting \$&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$var&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\n\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$var&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = NULL;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; unset(&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$var&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;echo \&quot;&amp;lt;hr&amp;gt;\n\&quot;;&lt;br /&gt;&lt;br /&gt;foreach (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_GET&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; as &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$var&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$val&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo \&quot;\$&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$var&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$var&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\n\&quot;;&lt;br /&gt;}&lt;br /&gt;foreach (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; as &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$var&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$val&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo \&quot;\$&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$var&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$var&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\n\&quot;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;echo \&quot;&amp;lt;/pre&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;\&quot;;&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;What I hope you&#039;ll see is a print out of your GET/POST data.  Then a list of &quot;unsetting your_variable&quot;.  Then a print out of of your GET/POST variables with no values.&lt;/p&gt;
 </description>
     <pubDate>Sun, 06 Oct 2002 06:34:26 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1115497 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
