Hi,
I have a Beaglebone Rev. A6a with TI Sitara OS installed.
I want to test a simple cgi program written in C with cgi and Lighttpd.
I have configured the Lighttpd as below for the cgi bin:
--------------------------------------------------------------------------------------
server.modules = (
"mod_cgi"
)
server.document-root = "/www/pages/"
server.port = 80
mimetype.assign = (
".html" => "text/html",
".txt" => "text/plain",
".jpg" => "image/jpeg",
".png" => "image/png"
)
index-file.names = ( "index.html" )
cgi.assign = (".cgi" => "/usr/bin/php-cgi")
--------------------------------------------------------------------------------------
I have made a file index.html as this for to test the c cgi bin with the POST method:
<form action="test.cgi" method="POST">
First Name: <input type="text" name="first_name"> <br />
Last Name: <input type="text" name="last_name" />
<input type="submit" value="Submit" />
</form>
I have cross-compiled a test.c program and I have put it in the Beaglebone renamed as test.cgi.
The problem is about the method POST.
When I send data with the Submit button in the browser, the POST method fail.
The cgi program don't receive the data.
The enviroment variable "CONTENT_LENGTH" is 0.
The browser execute the cgi bin and show a lot of characters...
Can anyone help me about the configuration of Lighttpd and cgi c program...?
"mod_cgi"
)
server.document-root = "/www/pages/"
server.port = 80
mimetype.assign = (
".html" => "text/html",
".txt" => "text/plain",
".jpg" => "image/jpeg",
".png" => "image/png"
)
index-file.names = ( "index.html" )
cgi.assign = (".cgi" => "/usr/bin/php-cgi")
--------------------------------------------------------------------------------------
I have made a file index.html as this for to test the c cgi bin with the POST method:
<form action="test.cgi" method="POST">
First Name: <input type="text" name="first_name"> <br />
Last Name: <input type="text" name="last_name" />
<input type="submit" value="Submit" />
</form>
I have cross-compiled a test.c program and I have put it in the Beaglebone renamed as test.cgi.
The problem is about the method POST.
When I send data with the Submit button in the browser, the POST method fail.
The cgi program don't receive the data.
The enviroment variable "CONTENT_LENGTH" is 0.
The browser execute the cgi bin and show a lot of characters...
Can anyone help me about the configuration of Lighttpd and cgi c program...?
Many thanks in advance