You are here: Re: session change from 4.2.3 -> 4.3.x? « PHP Programming Language « IT news, forums, messages
Re: session change from 4.2.3 -> 4.3.x?

Posted by Name on 09/06/05 17:59

Alvaro G Vicario <alvaro_QUITAR_REMOVE@telecomputer.com> wrote in
news:lmlwhwjxlhfc.tlwx4ywjbhn3.dlg@40tude.net:

> *** Name wrote/escribiσ (Fri, 02 Sep 2005 16:07:00 GMT):
>> <?
>> session_start();
>> session_register("count");
>> $count=$count+1;
>
> You modify $count *after* storing it in session data?
>
>> echo $count;
>> ?>
> [...]
>> session.register_globals=1
>
>> When I run this, count always displays as 1.
>
> From manual:
>
> "If you want your script to work regardless of register_globals, you
> need to instead use the $_SESSION array as $_SESSION entries are
> automatically registered. If your script uses session_register(), it
> will not work in environments where the PHP directive register_globals
> is disabled."
>
> I particularly find it very easy to write insecure scripts when
> register_globals is set to 'on' so I always use $_SESSION. I don't
> think it worth trying to debug a script that relies on
> register_globals.
>
>

Sorry, but I did read this part of the manual. Maybe I'm
misunderstanding it.
I thought, since I have register_globals set to "1," that I was okay.

In any event, using $_SESSION fixes my sample. However, my production
script
already uses $_SESSION, so I have nothing I can change (it also has
register_globals=1)
there. I can't post my production script (you wouldn't want it anyway.
It is about a
thousand lines long [don't look at me. I didn't design the
monstrosity.]).

I guess, at this point, I'm on my own again. If I figure out what is
happening and get
things running, I'll post the solution.

Thanks,
Vincent

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация