[geeklog-devel] Strange storage of strings (and other data) in gl_conf_values

Joe Mucchiello joe at ThrowingDice.com
Mon Mar 3 13:44:53 EST 2008


At 01:14 PM 3/3/2008, Blank, Jessica wrote:
>Hello gang:
>
>         I am working to port my LDAP authentication class to the 
> latest (as of today, Monday, 3/3/2008) CVS version of geeklog. In 
> the process, I noticed something odd in the database. In 
> gl_conf_values, strings aren't stored as 'foo', they're stored like 
> 's:3:"foo";', where 3 is the length of the string 'foo'.
>
>         Why is this done? It seems unnecessary. Can't the length of 
> a string be determined with a simple strlen()?

gl_conf_values can store anything so everything is serialize'd before 
storage[1]. You should not do any queries against gl_conf_values. You 
should be using $_CONF['whatever'] to reference configuration data 
like you do in 1.4.1.

[1] http://us2.php.net/manual/en/function.serialize.php


----
Joe Mucchiello
Throwing Dice Games
http://www.throwingdice.com 




More information about the geeklog-devel mailing list