Ejemplo n.º 1
0
// try to write configuration file
print "<h2>Writing configuration</h2>\n";
test("Writing configuration file <tt>" . $wakkaConfigLocation . "</tt>...", $fp = @fopen($wakkaConfigLocation, "w"), "", 0);
if ($fp) {
    fwrite($fp, $configCode);
    // write
    fclose($fp);
    if ($config2['wakka_version'] <= '1.3.2') {
        print "<p>Almost done! A maintenance operation is needed due to a change in the database structure. This maintenance can be resource consuming if you had many pages. Click on the following link and refresh the page until you see only the text \"Done...\". <a style=\"font-size: 24pt;\" href=\"" . WIKKA_BASE_URL . "/wikka.php?wakka=Do/maintenance.xml\" target=\"_blank\">Do maintenance.</a></p>";
    }
    print "<p>That's all! You can now <a href=\"" . WIKKA_BASE_URL . "\">return to your Wikka site</a>. However, you are advised to remove write access to <tt>wikka.config.php</tt> again now that it's been written. Leaving the file writable can be a security risk!</p>";
} else {
    // complain
    print "<p><span class=\"failed\">WARNING:</span> The configuration file <tt>" . $wakkaConfigLocation . "</tt> could not be written. You will need to give your web server temporary write access to either your wakka directory, or a blank file called <tt>wikka.config.php</tt> (<tt>touch wikka.config.php ; chmod 666 wikka.config.php</tt>; don't forget to remove write access again later, ie <tt>chmod 644 wikka.config.php</tt>). If, for any reason, you can't do this, you'll have to copy the text below into a new file and save/upload it as <tt>wikka.config.php</tt> into the Wikka directory. Once you've done this, your Wikka site should work. If not, please visit <a href=\"http://docs.wikkawiki.org/WikkaInstallation\">WikkaInstallation</a>.</p>\n";
    ?>
	<form action="<?php 
    echo myLocation();
    ?>
?installAction=writeconfig" method="post">
	<input type="hidden" name="config" value="<?php 
    echo Wakka::hsc_secure(serialize($config2));
    ?>
" /><?php 
    /*  #427 */
    ?>
	<input type="submit" value="Try again" />
	</form>	
	<?php 
    print "<xmp>" . $configCode . "</xmp>\n";
    //TODO: replace xmp and make code block downloadable
}
Ejemplo n.º 2
0
				$wiki->ClearLinkTable();
			}
			else
			{
				test("Insertion de la page $pagename ...", 0 ,"Existe d&eacute;j&agrave;.",0);
			}	

		}
	}
	break;
	
	// The funny upgrading stuff. Make sure these are in order! //
case "0.1":
	echo "<b>En cours de mise &agrave; jour de WikiNi 0.1</b><br>\n";
	test("Just very slightly altering the pages table...", 
		@mysql_query("alter table ".$config["table_prefix"]."pages add body_r text not null default '' after body", $dblink), "Already done? Hmm!", 0);
	test("Claiming all your base...", 1);
}

?>

<p>
A l'&eacute;tape suivante, le programme d'installation va essayer
d'&eacute;crire le fichier de configuration <tt><?php echo  $wakkaConfigLocation ?></tt>.
Assurez vous que le serveur web a bien le droit d'&eacute;crire dans ce fichier, sinon vous devrez le modifier manuellement.  </p>

<form action="<?php echo  myLocation(); ?>?installAction=writeconfig" method="POST">
<input type="hidden" name="config" value="<?php echo  htmlentities(serialize($config),ENT_COMPAT | ENT_HTML401 | ENT_SUBSTITUTE, "ISO8859-1") ?>">
<input type="submit" value="Continuer">
</form>