Development

#5873 (check_configuration.php outputs gramatically illogical warnings)

You must first sign up to be able to contribute.

Ticket #5873 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

check_configuration.php outputs gramatically illogical warnings

Reported by: hal Assigned to: fabien
Priority: minor Milestone: 1.2.5
Component: other Version: 1.2.4
Keywords: Cc:
Qualification: Unreviewed

Description

The warnings output by check_configuration.php are ambiguous.

For example, when the php.ini configuration contains: register_globals = On

The warning that is generated is as follows:

[[WARNING]] php.ini: register_globals set to off
            *** Set it to off in php.ini ***

The WARNING..." line implies that register_globals is set to "off" when in reality it is set to "on".

I suggest that this be changed to one of the following:

[[WARNING]] php.ini: register_globals set to on

or, even clearer:

[[WARNING]] php.ini: register_globals is currently set to on
            *** Set it to off in php.ini ***

After raising the issue in the symfony IRC channel, a number of people agreed that it would be good if this was changed.

Note that this issue is the same for all warnings generated by check_configuration, not just those for register_globals.

Change History

02/13/09 12:14:44 changed by hal

Another example of one of the warnings:

[[WARNING]] PDO is installed
            *** Install PDO (mandatory for Propel and Doctrine) ***

so that this makes sense, it should obviously say:

[[WARNING]] PDO is *not* installed
            *** Install PDO (mandatory for Propel and Doctrine) ***

02/13/09 12:21:26 changed by fabien

I don't want to have 2 sentences, one for when is works, and another one when it fails.

What about this simple changes?

[[WARNING]] XSL module installed: FAILED
            *** Install the XSL module (recommended for Propel) ***

I have added a FAILED text at the end of the sentence.

Index: data/bin/check_configuration.php
===================================================================
--- data/bin/check_configuration.php    (revision 15424)
+++ data/bin/check_configuration.php    (working copy)
@@ -11,7 +11,7 @@
 function check($boolean, $message, $help = '', $fatal = false)
 {
   echo $boolean ? "  OK        " : sprintf("[[%s]] ", $fatal ? ' ERROR ' : 'WARNING');
-  echo "$message\n";
+  echo sprintf("$message%s\n", $boolean ? '' : ': FAILED');
 
   if (!$boolean)
   {

02/13/09 13:17:18 changed by hal

wow - that was quick work! ;-)

I agree, it would be better if the messages was more concise, but the previous message printed out two lines rather than one.

I think your suggestion is a definte improvement.

It's not yet committed in 15424, is it? Can you tell me when will this be live in 1.2.5-DEV?

02/13/09 13:18:57 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.

(In [15482]) [1.2, 1.3] fixed check_configuration.php outputs gramatically illogical warnings (closes #5873)

02/13/09 13:19:18 changed by fabien

  • milestone set to 1.2.5.

02/13/09 15:01:51 changed by camason

  • status changed from closed to reopened.
  • resolution deleted.
[[WARNING]] php.ini: register_globals set to off: FAILED
             *** Set it to off in php.ini ***

Using the words set and failed infer that action was taken to try and set the value, and subsequently failed.

[[WARNING]] php.ini: register_globals is set to off: FAIL
             *** Set it to off in php.ini ***

This seems more clear. This does not suggest that a 'set' action was attempted.

02/13/09 15:23:19 changed by hal

I can see what camason means. This small change would indeed improve readability. Note the other checks would need to be amended also, to maintain consistency.

02/16/09 09:27:46 changed by fabien

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [15510]) [1.2, 1.3] enhanced check_configuration.php messages (closes #5873)