• Как заставить Mikrotik давать использовать любой DNS сервер?

    ifaustrue
    @ifaustrue
    Пишу интересное в теллеграмм канале @cooladmin
    Эмммм, ничего он по-умолчанию не режет, чего вы наговариваете!

    Режет ваша конфигурация, делать она это может в нескольких местах, самые очевидные:
    ip/firewall/filter rules
    ip/firewall/mangle
    ip/firewall/nat
    ip/route

    Проверьте всё что касается 53 порта UDP \ Any.
    Ответ написан
    Комментировать
  • Как запустить KPHP?

    Ставил на Ubuntu 12.04.4 LTS

    sudo apt-get install git-core openssl zlib1g-dev libcg libprcre3-dev

    Ставим libre2:
    wget re2.googlecode.com/files/re2-20140304.tgz
    tar -zxvf re2-20140304.tgz
    cd re2/
    make
    make test (Не обращаем внимание на ошибку)
    make install
    make testinstall

    cd /usr/local/src/
    git clone https://github.com/vk-com/kphp-kdb
    cd /usr/local/src/kphp-kdb/

    make kphp

    Проверяем сборку: /usr/local/src/kphp-kdb/objs/bin/kphp2cpp
    Если все ок:

    export KPHP_PATH=/usr/local/src/kphp-kdb

    Пример компиляции php в kphp:

    Для примера возмем файл bench.php
    Лежит он здесь: https://gist.github.com/anonymous/9391146
    Скачиваем, кладем.
    mkdir /var/www/testkphp
    cd /var/www/testkphp/
    Компилируем bench.php в kphp
    python /usr/local/src/kphp-kdb/KPHP/tests/kphp.py bench.php -o bench
    После компиляции запускаем
    ./bench
    Увидим таблицу тестов.

    Сравниваем с php:
    php bench.php

    Радуемся!
    Ответ написан
    2 комментария
  • Как запустить KPHP?

    Клонируем репозиторий KPHP
    В папке с репой делаем
    make kphp
    Не забываем поставить нужные библиотечки.
    Смотрим /kphp-kdb/objs/bin/kphp2cpp
    Там можно увидеть
    Запускаем:
    ./kphp2cpp ../test-kphp/index.php
    Результат выполнения

    File [kphp/index.src_index389dab75@u.h] changed
    File [kphp/xmain.cpp] changed
    File [kphp/init_scripts.cpp] changed
    File [kphp/init_scripts.h] changed
    File [kphp/index.src_index389dab75@u.cpp] changed
    File [kphp/dfs0.index.src_index389dab75@u.h] changed
    File [kphp/dfs0.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs1.index.src_index389dab75@u.h] changed
    File [kphp/dfs1.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs2.index.src_index389dab75@u.h] changed
    File [kphp/dfs2.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs3.index.src_index389dab75@u.h] changed
    File [kphp/dfs3.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs4.index.src_index389dab75@u.h] changed
    File [kphp/dfs4.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs5.index.src_index389dab75@u.h] changed
    File [kphp/dfs5.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs6.index.src_index389dab75@u.h] changed
    File [kphp/dfs6.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs7.index.src_index389dab75@u.h] changed
    File [kphp/dfs7.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs8.index.src_index389dab75@u.h] changed
    File [kphp/dfs8.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs9.index.src_index389dab75@u.h] changed
    File [kphp/dfs9.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs10.index.src_index389dab75@u.h] changed
    File [kphp/dfs10.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs11.index.src_index389dab75@u.h] changed
    File [kphp/dfs11.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs12.index.src_index389dab75@u.h] changed
    File [kphp/dfs12.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs13.index.src_index389dab75@u.h] changed
    File [kphp/dfs13.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs14.index.src_index389dab75@u.h] changed
    File [kphp/dfs14.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs15.index.src_index389dab75@u.h] changed
    File [kphp/dfs15.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs16.index.src_index389dab75@u.h] changed
    File [kphp/dfs16.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs17.index.src_index389dab75@u.h] changed
    File [kphp/dfs17.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs18.index.src_index389dab75@u.h] changed
    File [kphp/dfs18.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs19.index.src_index389dab75@u.h] changed
    File [kphp/dfs19.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs20.index.src_index389dab75@u.h] changed
    File [kphp/dfs20.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs21.index.src_index389dab75@u.h] changed
    File [kphp/dfs21.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs22.index.src_index389dab75@u.h] changed
    File [kphp/dfs22.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs23.index.src_index389dab75@u.h] changed
    File [kphp/dfs23.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs24.index.src_index389dab75@u.h] changed
    File [kphp/dfs24.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs25.index.src_index389dab75@u.h] changed
    File [kphp/dfs25.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs26.index.src_index389dab75@u.h] changed
    File [kphp/dfs26.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs27.index.src_index389dab75@u.h] changed
    File [kphp/dfs27.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs28.index.src_index389dab75@u.h] changed
    File [kphp/dfs28.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs29.index.src_index389dab75@u.h] changed
    File [kphp/dfs29.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs30.index.src_index389dab75@u.h] changed
    File [kphp/dfs30.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs31.index.src_index389dab75@u.h] changed
    File [kphp/dfs31.index.src_index389dab75@u.cpp] changed
    File [kphp/dfs.index.src_index389dab75@u.h] changed
    File [kphp/dfs.index.src_index389dab75@u.cpp] changed
    File [kphp/vars0.cpp] changed
    File [kphp/vars.cpp] changed
    Ответ написан
    1 комментарий