Seems like the "Request Entity Too Large" might come from the same issue I'm facing. Still no luck for me in trying to solve that.
By the way, I just realised I haven't even thank you DrKK for this guide, so please accept both my apologies and my thanks for this really nice guide. This got me to try and learn and a bit more about php and http servers, which I never fully understood before. So thanks again for that.
EDIT : This is due to a number of file descriptors problem. To be able to upload larger files, increase max-fds in lighttpd configuration. However, there is a Lighttpd bug, causing the same problem for files greater than 4MB (see
this link). The bug is fixed, but the revision is not yet released. I'm gonna try to apply the modification in the source and make lighttpd again, I'll keep you informed.
EDIT 2 : Ok, it's fixed now. Well kinda. Here is the fix :
Fetch and extract lighttpd port :
Code:
portsnap update
cd /usr/ports/www/lighttpd
make fetch
make extract
nano ./work/lighttpd-1.4.36/src/chunk.c
Then change the file according to
this link.
Then compile
Code:
make reinstall clean
Restart lighttpd, and you're good to go.
Btw, have a look at lighttpd error log if you have other problems, it will give you further details than "Request entity too large".
However, I had another issue after that, an error in mod_fastcgi.c whenever i upload a big file. I switched back to plain CGI, thus having the issue #1 mentioned above (php can't query system environment variables). I'll have a deeper look into that when I have more time, but it shouldn't be much of a problem).