Compiling Thttp+PHP4 with mmap_fixed option enabled
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 :eek: ) .
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 ;-)
thttpd and form post method on wl500g
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.