Bug #2612
closedStrange behaviour with form
Description
When sending a form with POST method Lighthttpd returns GET method and $_POST and $_FILES are empty if the action tag does not contain the script name.
<form method="post" action="localhost/test/" enctype="multipart/form-data">
<form method="post" action="localhost/test/index.php" enctype="multipart/form-data">
<label for="user">User</label><input name="user" />
<label for="pass">Pass</label><input name="pass" />
<input type="submit" name="submit" value="Submit" />
</form>
index.php :print_r( $_POST );
echo $_SERVER['REQUEST_METHOD'];
?>
The result is
Array ( ) GETI have the following configuration :
- Debian Jessie
- Lighttpd 1.4.35-4
- PHP 5.6.5-1
Files
Updated by Wintermute over 9 years ago
- File 15-fastcgi-php.conf.txt 15-fastcgi-php.conf.txt added
- File lighttpd.conf.txt lighttpd.conf.txt added
Updated by stbuehler over 9 years ago
- Status changed from New to Invalid
- Priority changed from High to Normal
- the name is still "lighttpd"
- stay away from the priority setting
- your action urls look broken - if "localhost" is supposed to be the hostname (and not a subfolder) you probably should use
//localhost/test/index.php
- I guess you have a redirect to index.php which breaks the POST. check the network log in your browser. the full config is missing (
lighttpd -p
). - test with curl and show the complete headers
Updated by Wintermute over 9 years ago
stay away from the priority setting
I don't understand ?
your action urls look broken - if "localhost" is supposed to be the hostname (and not a subfolder) you probably should use //localhost/test/index.php
The actual URL is :
<form method="post" action="http://localhost/test/" enctype="multipart/form-data">
I guess you have a redirect to index.php which breaks the POST. check the network log in your browser. the full config is missing (lighttpd -p).
jerome@debian:~$ sudo lighttpd -p
2015-02-09 10:58:25: (server.c.617) No configuration available. Try using -f option.
Updated by Wintermute over 9 years ago
- Status changed from Invalid to Reopened
Is there a solution ?
Updated by stbuehler about 9 years ago
- Status changed from Reopened to Invalid
There is nothing wrong with lighttpd - your browser log shows a GET.
Also available in: Atom