dolibarr/htdocs/install/index.php

85 lines
2.5 KiB
PHP
Raw Normal View History

<?php
2004-02-02 02:41:33 +01:00
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*
*/
2004-12-04 16:06:15 +01:00
/**
\file htdocs/install/index.php
2004-12-04 16:30:14 +01:00
\brief Test si le fichier conf est modifiable et si il n'existe pas, test la possibilit<EFBFBD> de le cr<EFBFBD>er
2004-12-04 16:06:15 +01:00
\version $Revision$
*/
2004-02-11 19:12:24 +01:00
include("./inc.php");
2004-12-04 16:06:15 +01:00
pHeader("Bienvenu dans Dolibarr", "licence"); // Etape suivante = license
2004-01-27 15:36:40 +01:00
print "Nous avons fait en sorte que l'installation soit le plus simple possible, vous n'avez qu'<27> suivre les <20>tapes une <20> une.";
$conf = "../conf/conf.php";
if (is_readable($conf))
{
include ($conf);
}
else
{
$fp = @fopen("$conf", "w");
if($fp)
{
@fwrite($fp, '<?php');
@fputs($fp,"\n");
@fputs($fp,"?>");
fclose($fp);
}
}
if (!file_exists($conf))
{
print "<br /><br />Le fichier de configuration <b>conf.php</b> n'existe pas !<br />";
print "Vous devez cr<63>er un fichier <b>htdocs/conf/conf.php</b> et donner les droits d'<27>criture dans celui-ci au serveur Apache.<br />";
$err++;
}
else
{
if (!is_writable("../conf/conf.php"))
{
print "<br /><br />Le fichier de configuration <b>conf.php</b> existe.<br />";
print "Le fichier <b>conf.php</b> n'est pas accessible en <20>criture, v<>rifiez les droits sur celui-ci, le serveur Apache doit avoir le droit d'<27>crire dans ce fichier le temps de la configuration (chmod 666 par exemple)<br>";
$err++;
}
else
{
print "<br /><br />Le fichier de configuration <b>conf.php</b> existe.<br />";
2004-12-04 16:06:15 +01:00
print "Le fichier <b>conf.php</b> est accessible en <20>criture<br /><br />Vous pouvez continuer...";
}
}
2004-01-27 15:36:40 +01:00
2004-12-04 16:30:14 +01:00
// Si pas d'erreur, on affiche le bouton pour passer <20> l'<27>tape suivante
if ($err == 0) pFooter();
2004-01-27 15:36:40 +01:00
?>