_GET and _POST variables do not exist when using lighttpd web server

Ererviciotork

New Member
I installed lighttpd web server on my Windows computer and I have a problem: in PHP files no _GET and _POST variables are defined.For example this simple script (tmp.php):\[code\]<?php echo "x: '" . $_GET ['x'] . "'<br>";?>\[/code\]When I go to the address: http://localhost/tmp.php?x=123I get the page:\[code\]Notice: Undefined index: x in /srv/www/htdocs/tmp.php on line 3 x: ''\[/code\]Whilst when I put the same file on public hosting I get:\[code\]x: '123'\[/code\]Also the php command:\[code\]empty ($_GET)\[/code\]returns true.The same is for all _POST variables.Is there any misconfiguration in my php.ini file?The command:\[code\]print_r($_SERVER); \[/code\]gives:Array ( [SERVER_SOFTWARE] => lighttpd/1.4.20 [SERVER_NAME] => localhost [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [SERVER_PORT] => 80 [SERVER_ADDR] => 0.0.0.0 [REQUEST_METHOD] => GET [REDIRECT_STATUS] => 200 [QUERY_STRING] => x=123 [REQUEST_URI] => /tmp.php?x=123 [REMOTE_ADDR] => 127.0.0.1 [REMOTE_PORT] => 3150 [CONTENT_LENGTH] => 0 [SCRIPT_FILENAME] => /srv/www/htdocs/tmp.php [SCRIPT_NAME] => /srv/www/htdocs/tmp.php [DOCUMENT_ROOT] => [SYSTEMROOT] => C:\WINNT [HTTP_ACCEPT] => / [HTTP_ACCEPT_LANGUAGE] => en-gb [HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1) [HTTP_ACCEPT_ENCODING] => gzip, deflate [HTTP_HOST] => localhost [HTTP_CONNECTION] => Keep-Alive [WINDIR] => C:\WINNT [PHP_SELF] => /srv/www/htdocs/tmp.php [PATH_TRANSLATED] => /srv/www/htdocs/tmp.php [REQUEST_TIME] => 1328287189 [argv] => Array ( [0] => /srv/www/htdocs/tmp.php ) [argc] => 1 ) So the values x=123 does appear there, but I don't know how to get it.
 
Top