|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-01-28 07:03 UTC] tolga at kadikoy-bld dot gov dot tr
Hello, Apache version : IBM_HTTP_Server/1.3.12.3 Apache/1.3.12 OS : AIX 4.3.3 Maintenance Level 10 applied I'm trying build a cookie based session system but an interesting problem occurs.When i use setcookie() function, it sends cookie to browser (and browser stores it) but i don't use cookie with $cookievariable.After a little inspection ( :) ) i found this result : -------------- Apache env. superglobal name : value HTTP_COOK0E : mytestcookie=mytestval HTTP_CONNECT0ON : Keep-Alive -------------- it seems wrong superglobal names here (I -> zero) if i use echo "$HTTP_COOK0E"; it works fine but if i use $HTTP_COOKIE not work. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 09:00:02 2025 UTC |
additional info for sniper's request; i checked var_dump($_SERVER) and only these vars mangled : HTTP_ACCEPT_ENCOD0NG HTTP_CONNECT0ON HTTP_COOK0E other vars (such as SCRIPT_FILENAME , SERVER_ADMIN) fine... i use that script : ---------------------- <? var_dump($_SERVER); ?> ---------------------- and script's output : ---------------------- array(30) { ["DOCUMENT_ROOT"]=> string(28) "/usr/HTTPServer/htdocs/en_US" ["HTTP_ACCEPT"]=> string(164) "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*" ["HTTP_ACCEPT_ENCOD0NG"]=> string(13) "gzip, deflate" ["HTTP_ACCEPT_LANGUAGE"]=> string(2) "tr" ["HTTP_CONNECT0ON"]=> string(10) "Keep-Alive" ["HTTP_COOK0E"]=> string(74) "4images_lastvisit=1043070424; 4images_userid=1; seysin=hoIIo; seyIIn=hoIIo" ["HTTP_HOST"]=> string(22) "www.kadikoy-bld.gov.tr" ["HTTP_USER_AGENT"]=> string(69) "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705)" ["HTTPS"]=> string(3) "OFF" ["PATH"]=> string(51) "/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" ["REMOTE_ADDR"]=> string(12) "172.22.1.250" ["REMOTE_PORT"]=> string(4) "2779" ["SCRIPT_FILENAME"]=> string(40) "/usr/HTTPServer/htdocs/en_US/sniper1.php" ["SERVER_ADDR"]=> string(14) "195.155.224.19" ["SERVER_ADMIN"]=> string(24) "tolga@kadikoy-bld.gov.tr" ["SERVER_NAME"]=> string(22) "www.kadikoy-bld.gov.tr" ["SERVER_PORT"]=> string(2) "80" ["SERVER_SIGNATURE"]=> string(0) "" ["SERVER_SOFTWARE"]=> string(45) "IBM_HTTP_Server/1.3.12.3 Apache/1.3.12 (Unix)" ["UNIQUE_ID"]=> string(19) "PjaKrsOb4BMAAIkMcL4" ["GATEWAY_INTERFACE"]=> string(7) "CGI/1.1" ["SERVER_PROTOCOL"]=> string(8) "HTTP/1.1" ["REQUEST_METHOD"]=> string(3) "GET" ["QUERY_STRING"]=> string(0) "" ["REQUEST_URI"]=> string(12) "/sniper1.php" ["SCRIPT_NAME"]=> string(12) "/sniper1.php" ["PATH_TRANSLATED"]=> string(40) "/usr/HTTPServer/htdocs/en_US/sniper1.php" ["PHP_SELF"]=> string(12) "/sniper1.php" ["argv"]=> array(0) { } ["argc"]=> int(0) } --------------------------@ Ilia: probably he is using tr_TR. I can see that problem if I set and export LC_ALL=tr_TR before starting Apache (1.3.27). If I do this, Apache starts to complain: Invalid command 'MIMEMagicFile', perhaps mis-spelled or defined by a module not included in the server configuration so I commented this line in the httpd.conf. So there might be a problem in Apache. I get the same strange results with a little Perl script (/cgi-bin/test.pl, I think it comes with Apache): print "Content-type: text/html\n\n"; print "%ENV: <br>\n", map { "$_ = $ENV{$_} <br>\n" } keys %ENV; This script also prints HTTP_CONNECTİON and so on (this is with mod_perl; the test.cgi shell script works ok). @Tolga: can you please try and put the following lines into your apachectl: unset LC_ALL LC_CTYPE=C export LC_CTYPE You might get other problems with these settings, unless you use setlocale(LC_CTYPE,"tr_TR") in your PHP scripts, though.