Welcome! Log In Create A New Profile

Advanced

Не определены $cookie_*, а куки есть. Почему?

Posted by rimeko 
Не определены $cookie_*, а куки есть. Почему?
June 06, 2012 06:39AM
Собственно вопрос в том, почему переменные $cookie_ не определены?

Для этого нужны какие-то определенные флаги компиляции? Или какие-то правильные настройки? Или они отключены начиная с какой-то версии и документация неактуальна?

Специально перепробовал версии nginx-1.2.0 1.3.0

Переменная $http_cookie определена "lang=ru", а переменная $cookie_lang не определена.

В лог пишет:
using uninitialized "cookie_lang" variable while sending response to client
Re: Не определены $cookie_*, а куки есть. Почему?
June 06, 2012 06:58AM
Подробности убрал бы под кат:

nginx -V
nginx version: nginx/1.3.0
TLS SNI support enabled
configure arguments: --prefix=/usr --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error_log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --user=nginx --group=nginx --with-cc-opt=-I/usr/include --with-ld-opt=-L/usr/lib --http-log-path=/var/log/nginx/access_log --http-client-body-temp-path=/var/tmp/nginx/client --http-proxy-temp-path=/var/tmp/nginx/proxy --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi --http-scgi-temp-path=/var/tmp/nginx/scgi --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi --with-pcre --with-pcre-jit --with-http_perl_module --with-http_xslt_module --with-http_realip_module --with-http_ssl_module --without-mail_imap_module --without-mail_pop3_module --without-mail_smtp_module


Простой html файл:

$rand: "<!--# echo var="rand" -->"<br>
$http_cookie: "<!--# echo var="http_cookie" -->"<br>
$cookie_lang: "<!--# echo var="cookie_lang" -->"<br>


Выдает:

$rand: "0.109653050586608"
$http_cookie: "lang=ru"
$cookie_lang: ""
Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 245
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready