hakuna matata

Рейтинг
260
Регистрация
14.01.2012
Vitaly2012:
а vcruntime140d.dll - нет, есть vcruntime140.dll (т.е. без буквы d)

А это была моя ошибка, попробуйте последний файл. remoteip_moduleVS2010.release.zip

hakuna matata:
https://gist.githubusercontent.com/n...mod_remoteip.c собранный в 10 студии, проверил в том же самом openserver - работает.

И этот попробуйте.

zip remoteip_moduleVS2010.release.zip
Vitaly2012:
Телеграма нет, в принципе поставить не сложно.

В мессенджере было бы быстрее, нежели тут.

https://gist.githubusercontent.com/newphp/727ad7eeae25606f1768/raw/2c6bb7f5ae48d5125da7abe6cde363147f87a135/apache-2.2-mod_remoteip.c собранный в 10 студии, проверил в том же самом openserver - работает.

zip remoteip_moduleVS2010.zip

Vitaly2012, я могу собрать в 2010 студии. У вас есть телеграм?

Vitaly2012:
Попробовал так-же локально на openserver

Как раз на нем и проверял.

Vitaly2012:
Причем никаких логов ошибок при вылете не выдает (

Так не бывает.

По существу уже ответили выше.

Поставьте https://www.microsoft.com/ru-ru/download/details.aspx?id=48145 или https://aka.ms/vs/15/release/vc_redist.x86.exe

Заодно собрал последний доступный mod_cloudflare, вшив туда актуальные адреса.

Включать так:

LoadModule cloudflare_module modules/cloudflare_module.dll

Попробуйте оба модуля и выберите, какой лучше подходит для вас.

zip cloudflare_module.zip

Vitaly2012, собрал вам этот модуль. Особо не тестировал, но у меня работает. Проверял на Apache/2.2.34 (Win32).

Включать так:

LoadModule remoteip_module modules/remoteip_module.dll
RemoteIPHeader CF-Connecting-IP
RemoteIPTrustedProxy 173.245.48.0/20
RemoteIPTrustedProxy 103.21.244.0/22
RemoteIPTrustedProxy 103.22.200.0/22
RemoteIPTrustedProxy 103.31.4.0/22
RemoteIPTrustedProxy 141.101.64.0/18
RemoteIPTrustedProxy 108.162.192.0/18
RemoteIPTrustedProxy 190.93.240.0/20
RemoteIPTrustedProxy 188.114.96.0/20
RemoteIPTrustedProxy 197.234.240.0/22
RemoteIPTrustedProxy 198.41.128.0/17
RemoteIPTrustedProxy 162.158.0.0/15
RemoteIPTrustedProxy 104.16.0.0/12
RemoteIPTrustedProxy 172.64.0.0/13
RemoteIPTrustedProxy 131.0.72.0/22
RemoteIPTrustedProxy 2400:cb00::/32
RemoteIPTrustedProxy 2606:4700::/32
RemoteIPTrustedProxy 2803:f800::/32
RemoteIPTrustedProxy 2405:b500::/32
RemoteIPTrustedProxy 2405:8100::/32
RemoteIPTrustedProxy 2a06:98c0::/29
RemoteIPTrustedProxy 2c0f:f248::/32
zip remoteip_module.zip
Vitaly2012:
Получается проблема была еще в 2012-м, когда модуль еще не считался устаревшим. (

Ну так возможно исправили в новых версиях, которые у вас не заработают.

Новые версии софта ведь выпускают не просто так.

function str_replace_n($search, $replace, $subject, $occurrence){
$search = preg_quote($search);
return preg_replace("/^((?:(?:.*?$search){".--$occurrence."}.*?))$search/ms", "$1$replace", $subject);
}

function ads_h2($content) {
$ads = 'БЛОК РЕКЛАМЫ';
$content = str_replace_n("<h2>", '<p style="text-align: center;">' . $ads . '</p><h2>', $data, 2);
return $content;
}

add_filter('the_content', 'ads_h2');
Всего: 2249