#9166 closed feature request (wontfix)
Installer should check that required constants are defined
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.7 |
Component: | Upgrade/Install | Keywords: | needs-patch |
Focuses: | Cc: |
Description
Beside the fact, that you can come more or less often to the point to start a flame-war because WordPress is designed to have the static configuration settings in a PHP File, some things can be done to improve the installation-easyness and provide better hints to this error-prone way of setting something up.
For Example: WordPress does not verify that really needed config PHP-Constants _are_ defined. Let's assume a user does not understand the configuration and enters the following in wp-config.php
{{{...
define('90a83383_dbYZ', 'putyourdbnamehere'); Der Name der Datenbank, die du benutzt.
define('90a83383_unZUF1', 'usernamehere'); Dein MySQL-Datenbank-Benutzername.
define('xxx', 'yourpasswordhere'); Dein MySQL-Passwort.
...}}}
then the wordpress error message that the connection to the db server failed does not reflect the fact, that the constants DB_NAME, DB_USER or DB_PASSWORD are not defined. Putting out this message clearly, that wp-config.php is not properly configured and the database configuration should be checked would help much instead.
Attachments (1)
Change History (19)
#1
@
16 years ago
- Keywords install added
- Milestone changed from 2.7.2 to 2.8
- Summary changed from Missing propper check transparently for needed config constants to Installer should check that required constants are defined
#4
@
16 years ago
The compontent that use such constants should throw the error in case they need them obligatory.
#5
@
16 years ago
suggesting wontfix on this. I mean, if a user can't create a wp-config file, he should use fantastico to install his site, or get hosted on wordpress.com
#6
@
16 years ago
Except that WordPress offers to create the wp-config.php file, which makes that arguement completely null.
A short message along the lines of (with better grammer of course) after including wp-config.php could possibly solve a few peopel getting confused.. But.. Hopefully theres enough documentation in the sample file already to explain it.
if ( ! defined('DB_PASS') ) die('wp-config is not configured properly. Please check the config defines');
#8
@
16 years ago
First patch. What I do not like is the fact that this code will be executed with every request. So maybe such code should be placed in the wp-config-sample file with a comment that it can be removed if everything works.
that will prevent that it is executed on setups that use the installer as DD32 pointed out.
#11
@
16 years ago
- Keywords dev-feedback added; developer-feedback removed
- Milestone changed from Future Release to 2.8
#15
@
16 years ago
Is this much of a problem in practice? Regardless, I'd rather have a separate diagnostics tool. "Having a problem? Run this tool to see what's wrong." That way we're not doing these checks on every page load.
Maybe #6631 is of interest as well to improve the installing experience.