Nabla,
try this:
<form action="test.php" method="post">
<input name="test" type="text">
<input type="submit">
</form>
<?
echo $_GET['test']
?>
Hello,
I have thttpd with php by erik_bies (thttpd-php4f_2.21b-2_mipsel - the latest one from this forum) up and running on my wl500b (1.9.2.7-3c). Everything works quite well, but if I try this:
variable $test remains empty after post (get). Any ideas?Code:<form action="test.php" method="post"> <input name="test" type="text"> <input type="submit"> </form> <? echo $test; ?>
Thanks
Last edited by Nabla; 07-02-2005 at 17:54.
Nabla,
try this:
<form action="test.php" method="post">
<input name="test" type="text">
<input type="submit">
</form>
<?
echo $_GET['test']
?>
Soundrel Days
Doesn't work
The aswer has been sended by private message to you...
Soundrel Days
It seems clear to me that this topic is not intended for all basic PHP language questions. Further basic language questions will be trashed/deleted.
For PHP language questions visit: www.php.net or use Google.
Sorry, I supposed that it was question related to thttpd+php behavior.
Next time I'll better keep quiet.
I was not responding directly to you, but just posted a general 'warning'.Originally Posted by Nabla
Yesterday I installed the thttp+PHP4 (thttpd-php4f_2[1].21b-2_mipsel.zip) on my Asus. It works really great! I want to thank Erik_Bies for the effort.
There is only a small issue with this version of thttp . It loads the complete webpage/file into memory before sending abroad. Serving huge files (like zip files of > 50MB in size) from the Asus becomes a problem this way because of lack of memory (even with 32 Mb swap space ) .
According to YATO there is solution for this (as decribed below):
-------------------------
Yato
--> mmap v thttpd <--
FYI
By default thttpd is trying to load whole page to memory before sending it to client. This means that kernel will kill it, when somebody wants to download any huge file from your web.
But it can be changed! Look for following lines in configure script:
> if test "$cross_compiling" = yes; then
> ac_cv_func_mmap_fixed_mapped=no
WL500g CAN do mmap, so you can set ac_cv_func_mmap_fixed_mapped to yes.
Then thttpd only memory-maps file and big files are served without impact on free memory.
Friend compiled it for me, but without PHP.
---------------------
Who is able to recompile the project with this flag/setting enabled. I would really appreciate it. It will make the thttpd more versatile.
I am using Busybox_httpd at this moment. It can serve huge pages, but it does not support PHP4. Thttpd would be the ideal solution.
Thanx in advance for effort ;-)
Can you send me ipk package, i want too php in my Asus.
thx
hi erik_bies ..
can u share your thttpd-php compile script? thx..
It has been discussed before but no solution has been posted.
I seem to have the same problem with the latest php-thttpd packages (2.25b+php5.0.4) as posted by NABLA on my wl500g.
Whatever I do I cannot post form information, but the get method works fine. I assume it has something to do with header parsing by the thttpd server since it seems that the server never starts to process the php script called by the form. Anyone have a solution?
Strange enough it sometimes works if i restart the server several times with the S80 script in /opt/etc/init.d although not very stable.