Tracker: Bugs

5 conf.pl gives version error when config.php is unreadable - ID: 1568355
Last Update: Comment added ( tokul )

Very low priority, I'm sure, but if a Squirrelmail
config.php is unreadable (permissions-wise) by a user
who runs conf.pl, they are presented with the "older
version" error message:

WARNING:
The file "config/config.php" was found, but it is for
an older version of SquirrelMail. It is possible to still
read the defaults from this file but be warned that many
preferences change between versions. It is
recommended that
you start with a clean config.php for each upgrade
that you
do. To do this, just move config/config.php out of
the way.

Continue loading with the old config.php [y/N]?

If the user continues, conf.pl is run with no
information, e.g. no defaults are selected in any of
the configuration dialogs. This dialog is misleading
because it's really due to a stoopid user, and not a
version discrepancy.

Suggest that instead of doing an existence test (-e) of
config.php, do a readable test (-r) or writable test
(-w). This way, if the user can't read config.php, the
system at least loads up config_default.php (with some
actual values) and doesn't give the "older version"
message. It also gives them a new extra seconds to type
away blissfully unaware that they don't have permission
to save their changes.

Relevant section of conf.pl:
############################################################

# First, lets read in the data already in there...
############################################################

if ( -w "config.php" ) {
open( FILE, "config.php" );
while ( $line = <FILE> ) {


blentz ( blentz ) - 2006-09-30 15:12

5

Closed

Fixed

Tomas Kuliavas

None

None

Public


Comment ( 1 )

Date: 2006-10-07 12:00
Sender: tokul

Logged In: YES
user_id=225877

fixed in 1.5.2cvs and 1.4.9cvs


Attached File

No Files Currently Attached

Changes ( 4 )

Field Old Value Date By
status_id Open 2006-10-07 12:00 tokul
resolution_id None 2006-10-07 12:00 tokul
close_date - 2006-10-07 12:00 tokul
assigned_to nobody 2006-10-05 05:20 tokul