1.12.8 - Accesek - blokowanie spamerskich IP
karilaja - 04-08-2009, 20:28
tosiek napisał/a: | To oznacza błąd konfiguracji serwera. To nie wina skryptu |
Tak, mam ten sam problem a z logów błędów wynika chyba, że problemem jest limit ustawiony na wielkość pliku .htaccess
Cytat: | htaccess file: /home/................./.htaccess (size: 261150B) exceeds limit (20480B) |
A może to jakoś obejść?
tosiek - 16-08-2009, 22:30
karilaja, niestety lecz mi nie jest znany żaden sposób na to
karilaja - 17-08-2009, 10:07
A jakby pchać adresy do bazy?... ale to głupie. A może napiszesz coś nowego????
tosiek - 23-08-2009, 13:22
karilaja, 10 tysięcy wpisów z bazy pobierane za każdym wejściem usera, raczej odpada
pomyśle nad jakimś rozwiązaniem z użyciem pliku
tobiasty - 08-11-2009, 13:57
Wgralem na serwer ustawilem chmod 777 i mam taki blad:
Kod: | Accesek blokowanie SPAM robotów - czarna lista IP
Accesek by tosiek
Warning: chmod() [function.chmod]: Operation not permitted in /home/tobiasty/domains/pogaduchy.eu/public_html/accesek.php on line 8
Warning: mkdir(/home/tobiasty/domains/pogaduchy.eu/public_html/bak/) [function.mkdir]: Permission denied in /home/tobiasty/domains/pogaduchy.eu/public_html/accesek.php on line 8
Warning: chmod() [function.chmod]: No such file or directory in /home/tobiasty/domains/pogaduchy.eu/public_html/accesek.php on line 8
Warning: chmod() [function.chmod]: Operation not permitted in /home/tobiasty/domains/pogaduchy.eu/public_html/accesek.php on line 8
Fatal error: Call to undefined function: get_headers() in /home/tobiasty/domains/pogaduchy.eu/public_html/accesek.php on line 8 |
Polecenie CRON'a
Matteo - 08-11-2009, 14:26
tosiek napisał/a: | Boltos, nadaj katalogowi w którym jest accesek chmod 777 lub 644
i samemu acceskowi też 777 lub 644i utwórz katalog bak i nadaj mu także chmod 777 |
Ten post tośka.
tobiasty - 08-11-2009, 14:53
Matteo napisał/a: | tosiek napisał/a: | Boltos, nadaj katalogowi w którym jest accesek chmod 777 lub 644
i samemu acceskowi też 777 lub 644i utwórz katalog bak i nadaj mu także chmod 777 |
Ten post tośka. |
Nadalem acceskowi 777, utworzylem katalog bak i nadalem mu 777 i dalej sie wyswietla:
Kod: |
Warning: chmod() [function.chmod]: Operation not permitted in /home/tobiasty/domains/pogaduchy.eu/public_html/accesek.php on line 8
Warning: chmod() [function.chmod]: Operation not permitted in /home/tobiasty/domains/pogaduchy.eu/public_html/accesek.php on line 8
Warning: chmod() [function.chmod]: Operation not permitted in /home/tobiasty/domains/pogaduchy.eu/public_html/accesek.php on line 8
Fatal error: Call to undefined function: get_headers() in /home/tobiasty/domains/pogaduchy.eu/public_html/accesek.php on line 8 |
tosiek - 08-11-2009, 22:17
tobiasty napisał/a: | Fatal error: Call to undefined function: get_headers() |
Nie masz takiej funkcji, masz zapewne php4 a ta funkcja jest od php5... Aktualizacja jest niezbędna!
A reszta to tylko ostrzeżenia.
tobiasty - 08-11-2009, 22:37
tosiek napisał/a: | tobiasty napisał/a: | Fatal error: Call to undefined function: get_headers() |
Nie masz takiej funkcji, masz zapewne php4 a ta funkcja jest od php5... Aktualizacja jest niezbędna!
A reszta to tylko ostrzeżenia. |
Moi admini caly czas twierdza ze na serwerze jest php5 W .htaccess mam dodane :
Kod: | AddType php5-cgi .php |
Tavaro - 08-11-2009, 23:12
Alternatywa dla php4:
Kod: | if(!function_exists('get_headers'))
{
function get_headers($url,$format=0)
{
$url=parse_url($url);
$end = "\r\n\r\n";
$fp = fsockopen($url['host'], (empty($url['port'])?80:$url['port']), $errno, $errstr, 30);
if ($fp)
{
$out = "GET / HTTP/1.1\r\n";
$out .= "Host: ".$url['host']."\r\n";
$out .= "Connection: Close\r\n\r\n";
$var = '';
fwrite($fp, $out);
while (!feof($fp))
{
$var.=fgets($fp, 1280);
if(strpos($var,$end))
break;
}
fclose($fp);
$var=preg_replace("/\r\n\r\n.*\$/",'',$var);
$var=explode("\r\n",$var);
if($format)
{
foreach($var as $i)
{
if(preg_match('/^([a-zA-Z -]+): +(.*)$/',$i,$parts))
$v[$parts[1]]=$parts[2];
}
return $v;
}
else
return $var;
}
}
} |
Źródło: php.net
tobiasty - 10-11-2009, 23:39
Tavaro napisał/a: | Alternatywa dla php4:
Kod: | if(!function_exists('get_headers'))
{
function get_headers($url,$format=0)
{
$url=parse_url($url);
$end = "\r\n\r\n";
$fp = fsockopen($url['host'], (empty($url['port'])?80:$url['port']), $errno, $errstr, 30);
if ($fp)
{
$out = "GET / HTTP/1.1\r\n";
$out .= "Host: ".$url['host']."\r\n";
$out .= "Connection: Close\r\n\r\n";
$var = '';
fwrite($fp, $out);
while (!feof($fp))
{
$var.=fgets($fp, 1280);
if(strpos($var,$end))
break;
}
fclose($fp);
$var=preg_replace("/\r\n\r\n.*\$/",'',$var);
$var=explode("\r\n",$var);
if($format)
{
foreach($var as $i)
{
if(preg_match('/^([a-zA-Z -]+): +(.*)$/',$i,$parts))
$v[$parts[1]]=$parts[2];
}
return $v;
}
else
return $var;
}
}
} |
Źródło: php.net |
Gdzie to wstawic?
Tavaro - 11-11-2009, 15:30
tobiasty, w accesek.php, za pierwszym
BTW niesamowity chaos panuje w tym pliku...
tobiasty - 11-11-2009, 16:52
Tavaro, nic nie pomoglo
Kod: | Warning: chmod() [function.chmod]: Operation not permitted in /home/tobiasty/domains/pogaduchy.eu/public_html/accesek.php on line 46
Warning: chmod() [function.chmod]: Operation not permitted in /home/tobiasty/domains/pogaduchy.eu/public_html/accesek.php on line 46
Warning: chmod() [function.chmod]: Operation not permitted in /home/tobiasty/domains/pogaduchy.eu/public_html/accesek.php on line 46
Fatal error: Call to undefined function: file_put_contents() in /home/tobiasty/domains/pogaduchy.eu/public_html/accesek.php on line 46 |
Tavaro - 11-11-2009, 17:25
Pomogło. Teraz masz inne błędy.
1. Znajdź wszystkie wystąpienia funkcji chmod w kodzie i dodaj przed nimi znak @. Znlazłem jeszcze coś takiego:
Cytat: | Solution:
copy file to some temorary directory.
delete original file altogether.
copy temporary file back to original location.
do the chmod() |
2. file_put_contents dla php4:
Kod: | if (!function_exists('file_put_contents')) {
function file_put_contents($filename, $data) {
$f = @fopen($filename, 'w');
if (!$f) {
return false;
} else {
$bytes = fwrite($f, $data);
fclose($f);
return $bytes;
}
}
} |
drake1 - 12-11-2009, 06:19 Temat postu: błąd po wywołaniu przez www wyskakuje:
Fatal error: Call to undefined function: file_put_contents() in /home/users/milosz/public_html/accesek.php on line 8
proszę o pomoc
|
|
|