Reply to Re: Funny session behavior

Your name:

Reply:


Posted by Jerry Stuckle on 04/11/07 12:49

Baeribeeri wrote:
> On 9 Apr., 21:59, iktorn <s...@phpfreelancer.net> wrote:
>> http://php.net/manual/en/function.session-register.php
>>
>> "If your script uses session_register(), it will not work in
>> environments where the PHP directive register_globals is disabled."
>>
>> 1) check your php.ini for register_globals directive and turn it on (not
>> recommended)
>> 2) use $_SESSION variable - best way to avoid such problems
>>
>> --
>> Wiktor Walchttp://phpfreelancer.net
>
> register_globals is enabled. Not only on my development machine. My
> Webhoster has register_globals enabled, too.
> The funny thing is, that other variables, which contain strings and
> integers, don't forget their values in the session file on the
> webserver. Only the array bilder[] forget the contents.
>
> I rewrote the code using $_SESSION variables. The problems stays.
>
> Hartmut Jäger (http:www.jaeger-edv-service.de)
>
>

First of all, don't use session_register(). It's not needed. Just use
the $_SESSION array.

Then ensure you aren't accidentally changing $_SESSION['bilder'] or
$bilder. It's easy to do with $register_globals on. IOW, is the code
you showed all the code, or just an excerpt.

And if this is a shared host, I would change hosting companies. The
security warnings have been out there for years - and I wouldn't trust
anyone who hasn't learned by now the potential problems it causes.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original 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

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация