Обратная связь, непонятка.

Правила раздела: faq.php?mode=okay
Модератор: Модераторы

Slik
Slik
Репутация: 0
Сообщения: 27
Зарегистрирован: 15.08.2017
С нами: 6 лет 7 месяцев

Сообщение #1 Slik » 06.02.2018, 15:57

Добрый день.

Свежая установка OkayCMS, имеем следующик баг.
Через обратную связь пишут заявку, в админке захожу вобратную связь, жму обработать, ничего не происходит, а в логи сервера пишет следующее.

Код: Выделить всё

2018/02/06 17:46:57 [error] 40222#100119: *965 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined variable: okay in /usr/local/www/***.kiev.ua/backend/ajax/update_object.php on line 4
PHP message: PHP Notice:  Trying to get property of non-object in /usr/local/www/***.kiev.ua/backend/ajax/update_object.php on line 4
PHP message: PHP Fatal error:  Call to a member function check_session() on null in /usr/local/www/***.kiev.ua/backend/ajax/update_object.php on line 4" while reading response header from upstream, client: IP , server: ***.kiev.ua, request: "POST /backend/ajax/update_object.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "***.kiev.ua", referrer: "http://***.kiev.ua/backend/index.php?module=FeedbacksAdmin"


Это баг такой или фича ?
Последний раз редактировалось Slik 19.02.2018, 06:12, всего редактировалось 1 раз.

zyxer M
zyxer M
Возраст: 32
Репутация: 77
Сообщения: 419
Зарегистрирован: 03.02.2016
С нами: 8 лет 1 месяц
Откуда: Днепр

Сообщение #2 zyxer » 07.02.2018, 08:37

здается мне что у вас в backend/ajax не отработал .htaccess он должен был реврайтить на backend/ajax/index.php который создает объект Okay и подключает запрашиваемый вами файл.
Всё сказанное мной, является лично моим мнением, и не является официальной позицией OkayCMS

Slik
Slik
Репутация: 0
Сообщения: 27
Зарегистрирован: 15.08.2017
С нами: 6 лет 7 месяцев

Сообщение #3 Slik » 07.02.2018, 09:07

Х.м.
У меня стоит только Nginx, как быть в этой ситуации ?

Реврайт для Nginx'a есть

Код: Выделить всё

rewrite ^/backend/ajax/([^/]+)\.php$ /backend/ajax/index.php?file=$1 last;

zyxer M
zyxer M
Возраст: 32
Репутация: 77
Сообщения: 419
Зарегистрирован: 03.02.2016
С нами: 8 лет 1 месяц
Откуда: Днепр

Сообщение #4 zyxer » 07.02.2018, 09:42

Можно посмотреть весь ваш конфиг?
Всё сказанное мной, является лично моим мнением, и не является официальной позицией OkayCMS

Slik
Slik
Репутация: 0
Сообщения: 27
Зарегистрирован: 15.08.2017
С нами: 6 лет 7 месяцев

Сообщение #5 Slik » 07.02.2018, 09:50

Вот полный конфиг.

Код: Выделить всё

  server {
   listen          IP:80;
   server_name     ***.kiev.ua www.***.kiev.ua;

   access_log /var/log/nginx/***-access.log      ;
   error_log  /var/log/nginx/***-error.log       error;

   root /usr/local/www/***;
   index index.php;
   charset utf-8;
   
   client_max_body_size 64M;

   location = /favicon.ico {
         log_not_found off;
         access_log off;
   }

   location = /robots.txt {
         allow all;
         log_not_found off;
         access_log off;
   }

    location /backend {

      index index.php;

      location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(.*)$;
                fastcgi_pass   php-fpm;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                include fastcgi_params;
                fastcgi_ignore_client_abort on;
                fastcgi_param  SERVER_NAME $http_host;
        }
   }

   rewrite   ^/admin/?$  /backend last;

   location ~* ^/(api|cache|compiled|config|design/(.*)/html|payment|Smarty|view)/(.*) { deny all; }

   location / {
         try_files $uri @rewrite;
   }

 
   location @rewrite {
      rewrite ^/catalog/([^/]+)/?$   index.php?module=ProductsView&category=$1;
      rewrite ^/catalog/([^/]+)   index.php?module=ProductsView&category=$1;
      rewrite ^/catalog/([^/]+)/([^/]+)/?$   index.php?module=ProductsView&category=$1&brand=$2;
      rewrite ^/products/([^/]+)/?$   index.php?module=ProductView&product_url=$1;
      rewrite ^/products/?$   index.php?module=ProductsView;
      rewrite ^/all-products/?$   index.php?module=ProductsView;
      rewrite ^/brands/([^/]+)/?$   index.php?module=ProductsView&brand=$1;
      rewrite ^/brands/([^/]+)/page_([^/]+)/?$   index.php?module=ProductsView&brand=$1&page=$2;
      rewrite ^/search/([^/]+)/?$   index.php?module=ProductsView&keyword=$1;
      rewrite ^/search/?$   index.php?module=ProductsView;
      rewrite ^/blog/([^/]+)/?$   index.php?module=BlogView&url=$1;
      rewrite ^/blog/?$   index.php?module=BlogView;
      rewrite ^/wishlist/([^/]+)/?$   index.php?module=WishlistView&id=$2&lang_label=$1;
      rewrite ^/wishlist/?$   index.php?module=WishlistView&lang_label=$1;
      rewrite ^/wishlist/delete/?$   index.php?module=WishlistView&id=$1&action=delete;
      rewrite ^/comparison/?$   index.php?module=ComparisonView;
      rewrite ^/cart/?$   index.php?module=CartView;
      rewrite ^/cart/([^/]+)/?$   index.php?module=CartView&add_variant=$1;
      rewrite ^/cart/remove/([^/]+)/?$   index.php?module=CartView&delete_variant=$1;
      rewrite ^/order/([^/]+)/?$   index.php?module=OrderView&url=$1;
      rewrite ^/order/?$   index.php?module=OrderView;
      rewrite ^/user/login/?$   index.php?module=LoginView;
      rewrite ^/user/register/?$   index.php?module=RegisterView;
      rewrite ^/user/logout/?$   index.php?module=LoginView&action=logout;
      rewrite ^/user/password_remind/?$   index.php?module=LoginView&action=password_remind;
      rewrite ^/user/password_remind/([0-9a-z]+)/?$   index.php?module=LoginView&action=password_remind&code=$1;
      rewrite ^/user/?$   index.php?module=UserView;
      rewrite ^/sitemap.xml?$   sitemap.php last;
      rewrite ^/yandex.xml?$   yandex.php last;
      rewrite ^/contact/?$   index.php?module=FeedbackView;
      rewrite ^/order/([^/]+)/([^/]+)/?$   index.php?module=OrderView&url=$1&file=$2;
      rewrite ^/backend/ajax/([^/]+)\.php$ /backend/ajax/index.php?file=$1 last;

      if (!-f $request_filename){
         set $rule_26 1$rule_26;
      }
      if (!-d $request_filename){
         set $rule_26 2$rule_26;
      }
      if ($rule_26 = "21"){
         rewrite ^/([^/]+)/?$ /index.php?module=PageView&page_url=$1;
      }
      rewrite ^/?$ /index.php?module=MainView&page_url=;

      rewrite ^ /index.php;
   }

location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(.*)$;
                fastcgi_pass   unix:/tmp/php-fpm.sock;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                include fastcgi_params;
                fastcgi_ignore_client_abort on;
                fastcgi_param  SERVER_NAME $http_host;
        }

   location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
if (!-e $request_filename){
rewrite ^/files/products/(.+) /resize/resize.php?file=$1&token=$query_string;
        }
    }

Slik
Slik
Репутация: 0
Сообщения: 27
Зарегистрирован: 15.08.2017
С нами: 6 лет 7 месяцев

Сообщение #6 Slik » 18.02.2018, 19:13

Таки да, кривовато работает через Nginx.
Поставил перед Nginx'ом апачь, обратная связь работает корректно.

Надо что то допилить.


Название раздела: Баг-репорт OkayCMS (Сообщения об ошибках)
Правила раздела: faq.php?mode=okay

Быстрый ответ


Введите код в точности так, как вы его видите. Регистр символов не имеет значения.
Код подтверждения

   

Вернуться в «Баг-репорт OkayCMS (Сообщения об ошибках)»

Кто сейчас на форуме (по активности за 5 минут)

Сейчас этот раздел просматривают: 13 гостей