coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Installation & Setup => Topic started by: JJUK on July 07, 2005, 10:16:11 PM

Title: 'Unable to write config.inc.php'
Post by: JJUK on July 07, 2005, 10:16:11 PM
I have uploaded files and entered all the database information correctly, and upon installation am getting an 'Unable to write config.inc.php' error come up.

If anyone has any ideas as to why this is happening and how it can be overcame, it would be helpful. I have installed coppermine many times before in the same way I did today, and have never had a problem before, so I am completely lost!

Ta.
Loz
Title: Re: 'Unable to write config.inc.php'
Post by: wizard-dk on July 07, 2005, 10:27:22 PM
maybe you need to chmod include to 777 ? is standard 755
Title: Re: 'Unable to write config.inc.php'
Post by: JJUK on July 07, 2005, 10:30:02 PM
Quote from: wizard-dk on July 07, 2005, 10:27:22 PM
maybe you need to chmod include to 777 ? is standard 755
The folder was already chmodded to 777.
Title: Re: 'Unable to write config.inc.php'
Post by: Nibbler on July 07, 2005, 10:31:49 PM
Create your config.inc.php manually using the sample as a guide.
Title: Re: 'Unable to write config.inc.php'
Post by: JJUK on July 07, 2005, 10:33:18 PM
Quote from: Nibbler on July 07, 2005, 10:31:49 PM
Create your config.inc.php manually using the sample as a guide.
I did, and I still got the error.
Title: Re: 'Unable to write config.inc.php'
Post by: Nibbler on July 07, 2005, 10:35:36 PM
Comment out this line in the installer:

write_config_file();
Title: Re: 'Unable to write config.inc.php'
Post by: JJUK on July 07, 2005, 10:59:10 PM
Quote from: Nibbler on July 07, 2005, 10:35:36 PM
Comment out this line in the installer:

write_config_file();

Just delete that bit of text?
Title: Re: 'Unable to write config.inc.php'
Post by: Nibbler on July 07, 2005, 11:01:55 PM
You can if you like, althoug commenting it out would be fine

//write_config_file();
Title: Re: 'Unable to write config.inc.php'
Post by: JJUK on July 07, 2005, 11:18:35 PM
Quote from: Nibbler on July 07, 2005, 11:01:55 PM
You can if you like, althoug commenting it out would be fine

//write_config_file();

I tried both commenting it out and deleting it, and both times got this error:

Parse error: parse error, expecting `T_STRING' in C:\Inetpub\vhosts\jamesroot.co.uk\httpdocs\gallery\install.php on line 480
Title: Re: 'Unable to write config.inc.php'
Post by: Nibbler on July 07, 2005, 11:30:33 PM
Then you did't edit the file correctly.
Title: Re: 'Unable to write config.inc.php'
Post by: JJUK on July 07, 2005, 11:36:10 PM
Quote from: Nibbler on July 07, 2005, 11:30:33 PM
Then you did't edit the file correctly.
Ah... I don't understand how, I've been following your instructions to the letter. This is really strange. I will show you what I have done, maybe there is an error, but I can't see it.

function //write_config_file();
{
    global $errors, $DFLT;

    test_im();
    detect_img_package();

    $config = build_cfg_file();
    @unlink($DFLT['cfg_f']);
    if ($fd = @fopen($DFLT['cfg_f'], 'wb')) {
        fwrite($fd, $config);
        fclose($fd);
    } else {
        $errors .= "<hr /><br />Unable to write config file '{$DFLT['cfg_f']}'<br /><br />";
    }
}


Thanks for all your help on this by the way. I don't get why this is going on, lol. But thank you for being patient with me.
Title: Re: 'Unable to write config.inc.php'
Post by: Nibbler on July 07, 2005, 11:43:34 PM
I meant the line further down, 545

        test_sql_connection();
        test_admin_login();
        //write_config_file();
Title: Re: 'Unable to write config.inc.php'
Post by: JJUK on July 08, 2005, 09:45:11 AM
Has installed fine. Thank you for your help.