modx не воспринимает GET запрос?

modx revo, есть сниппет 001 ждущий параметры из get запроса. Сниппет вызывается из шаблона002, по адресу ресурса 003 с шаблоном 002. если из любого браузера перейти по ссылке xxx.xx/getdata?a=1
то параметры запроса идут в сниппет, и всё ок. но есть некий скрипт вызывающий мой вышеупомянутый сниппет, этот некий скрипт запускаеться на железке к которой у меня нет доступа, и формирует точно такой же запрос, который по какой-то причине уже не выполняется сниппетом. Вопрос может ли модикс резать GET если запрос приходит не от браузера.
Типа — запрос не от браузера, ну и не буду с тобой возиться, фу таким быть…

причём, к примеру, Курла отрабатывает без проблем.
<?php
if( $curl = curl_init() ) {
    curl_setopt($curl, CURLOPT_URL, 'http://www.xxx.xx/getdata?a=1');
    curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
    $out = curl_exec($curl);
    echo $out;
    curl_close($curl);
  }
unixk0d
29 ноября 2016, 12:35
modx.pro
1
2 408
+1

Комментарии: 7

unixk0d
29 ноября 2016, 17:08
0
если рассматривать по фрэймам, то с железяки не идут опции пакета, то-есть нет блока опций:

Options: (12 bytes), No-Operation (NOP), No-Operation (NOP), Timestamps
        No-Operation (NOP)
            Type: 1
                0... .... = Copy on fragmentation: No
                .00. .... = Class: Control (0)
                ...0 0001 = Number: No-Operation (NOP) (1)
        No-Operation (NOP)
            Type: 1
                0... .... = Copy on fragmentation: No
                .00. .... = Class: Control (0)
                ...0 0001 = Number: No-Operation (NOP) (1)
        Timestamps: TSval 748314820, TSecr 1857173916
            Kind: Time Stamp Option (8)
            Length: 10
            Timestamp value: 748314820
            Timestamp echo reply: 1857173916
    Пётр Молчанов
    29 ноября 2016, 18:28
    0
    Надо смотреть логи доступа к серваку. У железяки наверняка статичный ip.
      Александр
      29 ноября 2016, 19:05
      0
      тут наверно вопросы уже не к modx, а к хостеру или apache/ngnix настройкам. Вероятно запрос воспринимается в качестве спама или подозрения на ddos. Надо и правда логи смотреть. Протестируйте с get запросом без modx. Тогда круг виновников сузится.
        unixk0d
        30 ноября 2016, 14:50
        0
        IP на обоих устройствах постоянные, тишарк показывает что пакет приходит, но без блока опций,
        к примеру элементарный скрипт
        <?php
        //$idu00 = htmlspecialchars($_GET["idu"]);
        $f0 = $_GET['idu'];
        $fd = fopen("logget.txt", 'w') or die("понятненько");
        fwrite($fd, $f0);
        fclose($fd);
        ?>
        если к нему обращаться xxx.xx/xxx.php?&ans=002&stat=003&idc=99999&idpt=xxxxxxxxxxxx&idu=99555999&idpr=1500&idrp=123456&end, из браузера, скриптами, да как угодно, всё ок, но не с железяки. Админы железяки открещиваются говорят от них запрос (указан выше) уходит, но если из браузера выполнить выше указанную строку данные то идут, и как возможный вариант железяка пакеты криво формирует, сейчас полезу в логи апача, также прикреплю лог отправки приема пакетов тишарком и браузером.
          unixk0d
          30 ноября 2016, 18:51
          0
          В общем проблема почти решена, нужно настроить .htaccess так чтобы при обращении к определенному ресурсу «xxx.xx/xxx.php» с get запросом не было редиректа,301 401
          железяка шифруется под "-" «Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko»
          # MODX supports Friendly URLs via this .htaccess file. You must serve web
          # pages via Apache with mod_rewrite to use this functionality, and you must
          # change the file name from ht.access to .htaccess.
          #
          # Make sure RewriteBase points to the directory where you installed MODX.
          # E.g., "/modx" if your installation is in a "modx" subdirectory.
          #
          # You may choose to make your URLs non-case-sensitive by adding a NC directive
          # to your rule: RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]
          
          RewriteEngine On
          RewriteBase /
          
          
          
          # Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
          #RewriteCond %{HTTP_HOST} .
          #RewriteCond %{HTTP_HOST} !^example-domain-please-change\.com [NC]
          #RewriteRule (.*) http://example-domain-please-change.com/$1 [R=301,L]
          #
          # or for the opposite domain.com -> www.domain.com use the following
          # DO NOT USE BOTH
          #
          RewriteCond %{HTTP_HOST} .
          RewriteCond %{HTTP_HOST} !^www\.xxx\.kz [NC]
          RewriteRule (.*) http://www.xxx.kz/$1 [R=301,L]
          
          #Redirect 301 http://xxx.com.by http://www.xxx.by
          #Redirect 301 http://www.xxx.com.by http://www.xxx.by
          
          
          # Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent 
          # https://www.domain.com when your cert only allows https://secure.domain.com
          #RewriteCond %{SERVER_PORT} !^443
          #RewriteRule (.*) https://example-domain-please-change.com/$1 [R=301,L]
          
          
          
          # The Friendly URLs part
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
          
          
          
          # Make sure .htc files are served with the proper MIME type, which is critical
          # for XP SP2. Un-comment if your host allows htaccess MIME type overrides.
          
          #AddType text/x-component .htc
          
          
          
          # If your server is not already configured as such, the following directive
          # should be uncommented in order to set PHP's register_globals option to OFF.
          # This closes a major security hole that is abused by most XSS (cross-site
          # scripting) attacks. For more information: http://php.net/register_globals
          #
          # To verify that this option has been set to OFF, open the Manager and choose
          # Reports -> System Info and then click the phpinfo() link. Do a Find on Page
          # for "register_globals". The Local Value should be OFF. If the Master Value
          # is OFF then you do not need this directive here.
          #
          # IF REGISTER_GLOBALS DIRECTIVE CAUSES 500 INTERNAL SERVER ERRORS :
          #
          # Your server does not allow PHP directives to be set via .htaccess. In that
          # case you must make this change in your php.ini file instead. If you are
          # using a commercial web host, contact the administrators for assistance in
          # doing this. Not all servers allow local php.ini files, and they should
          # include all PHP configurations (not just this one), or you will effectively
          # reset everything to PHP defaults. Consult www.php.net for more detailed
          # information about setting PHP directives.
          
          #php_flag register_globals Off
          
          
          # For servers that support output compression, you should pick up a bit of
          # speed by un-commenting the following lines.
          
          #php_flag zlib.output_compression On
          #php_value zlib.output_compression_level 5
          
          # The following directives stop screen flicker in IE on CSS rollovers. If
          # needed, un-comment the following rules. When they're in place, you may have
          # to do a force-refresh in order to see changes in your designs.
          
          #ExpiresActive On
          #ExpiresByType image/gif A2592000
          #ExpiresByType image/jpeg A2592000
          #ExpiresByType image/png A2592000
          #BrowserMatch "MSIE" brokenvary=1
          #BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
          #BrowserMatch "Opera" !brokenvary
          #SetEnvIf brokenvary 1 force-no-vary
            unixk0d
            05 декабря 2016, 16:53
            0
            С редеректом нечего поделать не смог, единственный вариант вызывать тупо php не из корня и долбить прямым запросом в базу данных, не используя xpdo.
            Отсюда новый вопрос как? Подскажите в новой теме как это сделать, пожалуйста modx.pro/help/10560/
              unixk0d
              06 декабря 2016, 11:43
              0
              Всем огромнейшее спасибо, за то что откликнулись, как я и полагал проблема была в железке. Вторая сторона хоть и не явно но признала свою вину. Дня за два думаю выясню у них в чем-же была причина редеректа и отпишусь. Еще раз всем Спасибо!
                Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.
                7