Така значи ползвам appserv най-новия с php 6 и ми дава следните грешки
ето ми го кода на include_file.php
някакви идеи как да ги оправя? Ето вижте сайта.
Код:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\AppServ\www\portfolio\index.php:1) in C:\AppServ\www\portfolio\include_file.php on line 2
Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Helsinki' for '3.0/DST' instead in C:\AppServ\www\portfolio\include_file.php on line 7
Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Helsinki' for '3.0/DST' instead in C:\AppServ\www\portfolio\include_file.php on line 8
PHP:
<?php
session_start();
define('INCLUDE_CHECK',true);
include("connect.php");
$ip = $_SERVER['REMOTE_ADDR'];
$date = date("Y-m-d");
$time = date("H:m:s");
mysql_query("SELECT * FROM ip_banned WHERE ip = '$ip'");
if (mysql_affected_rows() < 1) {
if ($_SESSION['session'] !== 1) {
mysql_query("SELECT * FROM ip_log WHERE ip = '$ip'");
if (mysql_affected_rows() < 1) {
mysql_query("UPDATE ip_stats SET visitors = visitors + 1 , unique_visitors = unique_visitors + 1");
mysql_query("INSERT INTO ip_log VALUES ('','$ip','$date','$time')");
} else {
mysql_query("UPDATE ip_stats SET visitors = visitors + 1");
mysql_query("INSERT INTO ip_log VALUES ('','$ip','$date','$time')");
}
$_SESSION['session'] = 1;
} else {
mysql_query("UPDATE ip_stats SET visitors = visitors + 1");
}
} else {
$q = mysql_query("SELECT reason FROM ip_banned WHERE ip = '$ip'");
while ($row = mysql_fetch_array($q)) {
$reason = $row['reason'];
}
if ($reason == "") {
$reason = "Няма причина";
}
echo "<table border=0 width='100%' height='100%'><tr><td align='center' valign='middle'><div style='border:dotted;background-color:#FFCCCC;width:450px;font-family:Tahome,Verdana;font-weight:bold;padding:25px;width:800px'><img src='admin/gfx/stop.png'><br><br>Вашето IP ($ip) е баннато от този сайт!<br><u>Причина:</u> $reason</div></td></tr></table>";
exit();
}
?>