salut
j'ai un petit souci que je n'arrive pas a resoudre
j'ai installé un script php chez mon hebergeur.
le site peut s'afficher dans plusieurs langues diffrentes
avec une langue par defaut, mais
lorque j'envoie la page d'index j'ai ces erreurs :
Warning: main(): open_basedir restriction in effect. File(/home/www/languages/default/default.php) is not within the allowed path in secure.php on line 27
Warning: main(/home/www/languages/default/default.php): failed to open stream: Operation not permitted in secure.php on line 27
Warning: main(): Failed opening '/home/www/languages/default/default.php' for inclusion (include_path='/var/www/62/h/y/p/hyper.com/www/include/:.') in secure.php on line 27
Warning: opendir(): open_basedir restriction in effect. File(/) is not within the allowed path in header.php on line 129
Warning: opendir(/): failed to open dir: Operation not permitted in header.php on line 129
Warning: readdir(): supplied argument is not a valid Directory resource in header.php on line 131
Warning: closedir(): supplied argument is not a valid Directory resource in header.php on line 137
voici mon code du fichier sercure.php :
<?php
if (isset($l) && !is_dir($int_path.'/languages/'.$l) && $l != "")
{
include $int_path."/languages/default/default.php";
include $int_path."/templates/header.php";
$sys = getenv(HTTP_USER_AGENT);
$path = getenv(REQUEST_URI);
$sql = "INSERT INTO ".$mysql_admin." (ip, sys, path, date) VALUES (INET_ATON('".ip()."'), '".$sys."', '".$path."', NOW(''))";
mysql_query($sql);
$data=date("H:i:s d/m/Y", time() + $date_diff*60*60);
echo $err_mes_top.$lang[128].ip().$lang[129].$lang[133].$sys.$lang[135].$data.$err_mes_bottom;
include $int_path."/templates/footer.php";
die;
}
if ($l == "")
{
include $int_path."/languages/default/default.php";
}
else
{
include $int_path."/languages/".$l."/".$l.".php";
}
?>
et celui du fichier header.php :
<?php
print <<<EOT
<center>
<Table Border="1" CellSpacing="0" CellPadding="2" bgcolor=$color3 bordercolor=black>
<Tr>
<Td Width="99" align="center"><a href="$url/index.php?l=$l" class=menu>$lang[25]</a></Td><Td Width="99" align="center"><a href="$url/add.php?l=$l" class=menu>$lang[1]</a></Td><Td Width="100" align="center"><a href="$url/login.php?l=$l" class=menu>$lang[2]</a></Td><Td Width="99" align="center"><a href="$url/search.php?l=$l" class=menu>$lang[3]</a></Td><Td Width="100" align="center"><a href="$url/email.php?l=$l" class=menu>$lang[23]</a></Td><Td Width="99" align="center"><a href="$url/faq.php?l=$l" class=menu>FAQ</a></Td><Td Width="100" align="center"><a href="$url/stat.php?l=$l" class=menu>$lang[24]</a></Td></Tr>
EOT;
if (!(($l != "") && ($show_lf == "0")))
{ $handle=opendir("$int_path/$flag_path");
$filenumber = 0;
while (false!==($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$langfile[$filenumber] = substr($file,0,strpos($file,'.'));
$filenumber++;
}
}
closedir($handle);
if ($filenumber == 0)
{
echo "<br><br><b>".$lang[179]." ".$url."/languages/".$l."</b><br><br>";
}
elseif ($filenumber > 1)
{
$i = 0;
echo "<Tr><Td align=\"right\" colspan=7><b>".$lang[52]." : </b> ";
for ($i = 0; $i < $filenumber; $i++)
{
echo "<a href=$url/index.php?l=".$langfile[$i]."><img src=\"".$url."/".$flag_path."/".$langfile[$i].".gif\" width=\"20\" height=\"13\" border=\"0\"></a> ";
}
echo "</Td></Tr>";
}
}
echo "</Table>";
?>
merci de votre aide
j'ai un petit souci que je n'arrive pas a resoudre
j'ai installé un script php chez mon hebergeur.
le site peut s'afficher dans plusieurs langues diffrentes
avec une langue par defaut, mais
lorque j'envoie la page d'index j'ai ces erreurs :
Warning: main(): open_basedir restriction in effect. File(/home/www/languages/default/default.php) is not within the allowed path in secure.php on line 27
Warning: main(/home/www/languages/default/default.php): failed to open stream: Operation not permitted in secure.php on line 27
Warning: main(): Failed opening '/home/www/languages/default/default.php' for inclusion (include_path='/var/www/62/h/y/p/hyper.com/www/include/:.') in secure.php on line 27
Warning: opendir(): open_basedir restriction in effect. File(/) is not within the allowed path in header.php on line 129
Warning: opendir(/): failed to open dir: Operation not permitted in header.php on line 129
Warning: readdir(): supplied argument is not a valid Directory resource in header.php on line 131
Warning: closedir(): supplied argument is not a valid Directory resource in header.php on line 137
voici mon code du fichier sercure.php :
<?php
if (isset($l) && !is_dir($int_path.'/languages/'.$l) && $l != "")
{
include $int_path."/languages/default/default.php";
include $int_path."/templates/header.php";
$sys = getenv(HTTP_USER_AGENT);
$path = getenv(REQUEST_URI);
$sql = "INSERT INTO ".$mysql_admin." (ip, sys, path, date) VALUES (INET_ATON('".ip()."'), '".$sys."', '".$path."', NOW(''))";
mysql_query($sql);
$data=date("H:i:s d/m/Y", time() + $date_diff*60*60);
echo $err_mes_top.$lang[128].ip().$lang[129].$lang[133].$sys.$lang[135].$data.$err_mes_bottom;
include $int_path."/templates/footer.php";
die;
}
if ($l == "")
{
include $int_path."/languages/default/default.php";
}
else
{
include $int_path."/languages/".$l."/".$l.".php";
}
?>
et celui du fichier header.php :
<?php
print <<<EOT
<center>
<Table Border="1" CellSpacing="0" CellPadding="2" bgcolor=$color3 bordercolor=black>
<Tr>
<Td Width="99" align="center"><a href="$url/index.php?l=$l" class=menu>$lang[25]</a></Td><Td Width="99" align="center"><a href="$url/add.php?l=$l" class=menu>$lang[1]</a></Td><Td Width="100" align="center"><a href="$url/login.php?l=$l" class=menu>$lang[2]</a></Td><Td Width="99" align="center"><a href="$url/search.php?l=$l" class=menu>$lang[3]</a></Td><Td Width="100" align="center"><a href="$url/email.php?l=$l" class=menu>$lang[23]</a></Td><Td Width="99" align="center"><a href="$url/faq.php?l=$l" class=menu>FAQ</a></Td><Td Width="100" align="center"><a href="$url/stat.php?l=$l" class=menu>$lang[24]</a></Td></Tr>
EOT;
if (!(($l != "") && ($show_lf == "0")))
{ $handle=opendir("$int_path/$flag_path");
$filenumber = 0;
while (false!==($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$langfile[$filenumber] = substr($file,0,strpos($file,'.'));
$filenumber++;
}
}
closedir($handle);
if ($filenumber == 0)
{
echo "<br><br><b>".$lang[179]." ".$url."/languages/".$l."</b><br><br>";
}
elseif ($filenumber > 1)
{
$i = 0;
echo "<Tr><Td align=\"right\" colspan=7><b>".$lang[52]." : </b> ";
for ($i = 0; $i < $filenumber; $i++)
{
echo "<a href=$url/index.php?l=".$langfile[$i]."><img src=\"".$url."/".$flag_path."/".$langfile[$i].".gif\" width=\"20\" height=\"13\" border=\"0\"></a> ";
}
echo "</Td></Tr>";
}
}
echo "</Table>";
?>
merci de votre aide