View Issue Details

IDProjectCategoryView StatusLast Update
0006843mantisbtinstallationpublic2006-05-07 03:51
Reporterjiangxin Assigned Tothraxisp  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Fixed in Version1.1.0a1 
Summary0006843: is_writable never success in install.php
Description

PHP Manual says:
bool is_writable ( string filename )
Returns TRUE if the filename exists and is writable.

But in mantis install.php:
if ( !file_exists ( $t_config_filename ) ) {
if ( is_writable( $t_config_filename ) ) {
becuase $t_config_filename not exist, so is_writable always return false.

Additional Information

my fix:

diff --exclude=CVS -u -r mantis-sf-mirror/admin/install.php mantis/admin/install.php
--- mantis-sf-mirror/admin/install.php 2006-03-15 16:44:40.375000000 +0800
+++ mantis/admin/install.php 2006-03-15 16:41:43.843750000 +0800
@@ -613,8 +614,7 @@

    $t_config_filename = $g_absolute_path . 'config_inc.php';
    if ( !file_exists ( $t_config_filename ) ) {
  • if ( is_writable( $t_config_filename ) ) {
  • $fd = fopen( $t_config_filename, 'x' );
  • if ( $fd = fopen( $t_config_filename, 'w' ) ) {
    fwrite( $fd, $t_config );
    fclose( $fd );
    }
TagsNo tags attached.

Relationships

parent of 0007031 closedvboctor Port: is_writable never success in install.php 

Activities

thraxisp

thraxisp

2006-03-27 21:09

reporter   ~0012424

Fixed in CVS.

admin/install.php -> 1.27