Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Vanilla fails to install on PHP5.2.17, Windows7, Apache2.2

edited November 2011 in Vanilla 2.0 - 2.8
Hello, seems to me that Vanilla setup fails to save configuration to config.php at class.configuration.php, line 536:
chmod($TmpFile, 0775);
$Result = rename($TmpFile, $File); // Returns false.

After I modified code as follows, setup completed successfully:
chmod($TmpFile, 0775);
if(is_file($File)) {
unlink($File);
}
$Result = rename($TmpFile, $File);

Best Answer

  • ToddTodd Chief Product Officer Vanilla Staff
    Answer ✓
    @schket, I'm worried about your method because it is not atomic and susceptible to a race condition. Can you try the following:
    chmod($TmpFile, 0775);
    if (!rename($TmpFile, $File)) {
    if (copy($TmpFile, $File)) {
    unlink($TmpFile);
    $Result = TRUE;
    }
    }
    I'm proposing you try a copy and unlink the temp file rather than unlink the original file.

Answers

Sign In or Register to comment.