Help save net neutrality! Learn more.
Close

#45 New config system

m7
closed
nobody
None
5
2003-01-10
2002-03-27
No

Problem: The advent of the $_PSL array has
become a problem in that config.php3 is now huge
and very unwieldy. New users could be very easily
intimidated by the looks of config.php3. Will cause
problems also when user prefes become an
issue in next milestone

Soultion: Split config.php3 into a config file for
variables and a loader file that does the
heavtylifting of require()'ing things, seting up
classes, etc... the config will be editied by the
user, the loader should never be seen.

Technical Discussion: php offers an ini_parse()
function that should be very fast and applicable to
the config file. This will parse an ini style file into
php arrays.

This parsing overhead could become troublesome
in a high load environment, considering that config
variables don't change a lot, caching of the config
after creation should be done. This could be done
with the current session engine, essentailly at first
hit, a session is created, config parsed and the
sessionified. Then as user moves through
phpslash enabled site the config follows from the
serialized array in the session. User modification
(skin, language, etc..) could then be overlaid on top
of the sessionified array and make it transparent
to the user, admin and code.

phplib offers experimental support for php4 native
sessions using a db save_handler that we should
use (php4 sessions have been found to be a lot
faster than the current session class in phplib)
and would allow the use of the trans_id feature of
php, so that users could choose to disable
cookies if they prefer.)

Problems forseen:
- Some magic would be need to push changes in
the config ini file into current sessions
- session started by search engines would be
need to be dealt with (high gc probability, low
session lifetime?)
- People using GET mode who post a link with
their session id would expose their entire account.
- Auth'ed status would need to be different from
logged in status (eg: you can cookie your self so
your prefs pop up, but you'd need to re-auth your
self in order to change settings, post things, etc..)

Discussion

  • nathan hruby

    nathan hruby - 2002-04-23

    Logged In: YES
    user_id=19736

    -- Combining from other request as these two
    -- requests deal with the same code and should be
    -- worked on together

    The current 0.65 variable situation is much better than
    previous versions. All the variables are in one array
    and it's very neat.

    Currently phpslash does little checking on user input
    to chnage variables (skin, lanuage, etc..) on the fly
    and each subsction is responsible for finding and
    dealing with the variables they need.

    Would like a set function to suck in GET and POST
    variable chnages and sanely inport them into the $PSL
    array with respect to global and user pref's all the
    while checking the input to make sure nothin foul is
    afoot. this would be a much better and more OO way of
    dealing with things.

    Even better would be to have the ability to allow
    modules to tell the variable parser what they need, so
    superflous info is dropped and psl never sees it.

     
  • nathan hruby

    nathan hruby - 2002-04-23
    • status: open --> closed
     
  • nathan hruby

    nathan hruby - 2002-04-23

    Logged In: YES
    user_id=19736

    Closing - merged with Feature Request #535759

     
  • nathan hruby

    nathan hruby - 2002-04-27
    • status: closed --> open
     
  • nathan hruby

    nathan hruby - 2002-04-27

    Logged In: YES
    user_id=19736

    Crap.. closed wrong feature request :) Reopening this one
    and closing the correct one

     
  • nathan hruby

    nathan hruby - 2002-04-27
    • milestone: --> m7
     
  • Joe Stewart

    Joe Stewart - 2002-09-17

    Logged In: YES
    user_id=77269

    initial test of ini_parsed config file is available in CVS.

     
  • Joe Stewart

    Joe Stewart - 2003-01-10

    Logged In: YES
    user_id=77269

    This feature has been added to the CVS. Please update your
    copy of PHPSlash, or wait for the next release.

     
  • Joe Stewart

    Joe Stewart - 2003-01-10
    • status: open --> closed
     

Log in to post a comment.