<div dir="ltr"><br><br><div class="gmail_quote">On Sat, Jul 26, 2008 at 2:23 PM, Dominique Dumont <span dir="ltr"><<a href="mailto:domi.dumont@free.fr">domi.dumont@free.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">"Raphaël Pinson" <<a href="mailto:raphink@gmail.com">raphink@gmail.com</a>> writes:<br>
><br>
>     Also, did you observe that augparse runs _really_ slow with that<br>
>     lens ?  It seems to allocate a _ton_ of memory. Seems like we<br>
>     need to do some optimizations somewhere to keep that at bay.<br>
><br>
> Very slow indeed. Maybe the tip you gave me on dput.aug would<br>
> improve this. The fact is that php.aug has _tons_ of keywords. I'm<br>
> not even sure to have listed them all. since it seems that PHP<br>
> modules might allow more here...<br>
<br>
</div>An alternative way would be to use Augeas only to perform<br>
transformation from syntax to abstract tree and to control/validate<br>
the content of the abstract tree with another tool. Your tons of<br>
keywords would be declared in and verified by this other tool.</blockquote><div><br>This was my original idea... but [^=:\n] matches "/" so I didn't find a way to specify a key word without naming it. Any idea is welcome!<br>
<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> There's another problem though. As I was working on this file, it<br><div class="Ih2E3d">

> seems logical to me to treat it as a standard INI file, with<br>
> sections and variables. Now I was surprised to find that variables<br>
> have a naming space in them, such that most variables exist several<br>
> times in different naming spaces (e.g.<br>
> (ifx,msql,mssql,mysql,mysqli,<br>
> odbc,pgsql,etc.).allow_persistent. After noticing that, I wondered<br>
> if the sections in php.ini were _really_ useful. If the were, what<br>
> would be the use of adding a naming space to the variable names? So<br>
> I talked with a few of my colleagues that are used to php.ini, and<br>
> they told me that PHP seems to completely ignore the sections in<br>
> php.ini, such that moving variables around has no effect on the<br>
> configuration. In that situation. should we consider sections as<br>
> comments, seeing that it would be hard to move values around if we<br>
> use standard INI file sections?<br>
<br>
</div>From my experience on Config::Model, I'd said you should focus on the<br>
semantics of the configuration file and not its syntax. The syntax is<br>
an "implementation detail".<br>
<br>
It looks like the "real" structure of php configuration is modeled<br>
after the "naming spaces" you mentioned. Presenting this "real"<br>
structure is more likely to help your users than presenting the INI<br>
file structure which has not much meaning.</blockquote><div><br><br>Thank you for the advice. The name "php.ini" suggests that this file is supposed to be an INI file though. I'm wondering if maybe this has originally been done for Windows compatibility. I think Windows requires INI files to have sections. <br>
<br>If the real structure of php.ini does not consider sections, do you think it would be better to just see them as comments ?<br><br><br>Raphael<br></div></div></div>