[Phpmyadmin-devel] NULL in config.inc.php

Isaac Bennetch bennetch at gmail.com
Sat Aug 17 17:23:51 CEST 2013


On 8/17/13 10:01 AM, Marc Delisle wrote:
> Le 2013-08-16 08:07, Isaac Bennetch a écrit :
>> Hi, I'm working through fixing up a bit of SSL code and have encountered
>> a difficulty. The PHP manual[1] says that unused parameters "may be
>> given as NULL". In my testing, setting them = ''; works fine, but of
>> course we want to do what PHP expects. In config.inc.php, we don't have
>> any values that default to NULL, and I think it may confuse users in
>> this case. I'd much prefer to leave them set = ''; in config.inc.php for
>> consistency and to make it easy for users to plug in their own values.
> 
> Hi Isaac,
> what do you mean, in config.inc.php? We do not offer this file in the
> download kit. Do you mean the generated config.inc.php via setup? or the
> sample config file?

Yes, in libraries/config.default.php, although technically I was more
concerned about what the user sees and does in their own config.inc.php
which is how I introduced the confusion. But you say below (and I agree)
that we should document the truth so where I said config.inc.php just
pretend I said libraries/config.default.php.

>> What I am thinking of is in libraries/config.default.php to set the
>> parameters to NULL, then if the user decides to overwrite it in
>> config.inc.php there is no problem. In that case, I'm not sure I'd write
>> the end-user documentation as if the default was = ''; or NULL.
> 
> Indeed we should do what PHP expects and use NULL; and I suggest that
> the user doc tell the truth (config.default.php contains NULL). The doc
> should give a clear example when a value other than NULL needs to be used.

Thanks for the help. I've opened a pull request[2] about this; it works
on my ssl server so the only real question is whether the documentation
is sufficient.

>> If my question has made sense, what do you think?
>>
>> 1 - http://php.net/manual/en/mysqli.ssl-set.php

2 - https://github.com/phpmyadmin/phpmyadmin/pull/605




More information about the Developers mailing list