Project

General

Profile

Request entity too long error while uploading a file above 61KB in PHP - lighttpd - Windows 32-bit and 64-bit binaries by dtech(.hu)

Added by remya over 4 years ago

Hi,

I have set up PHP and Lighttpd in my windows PC by following the instructions in the below link.

https://redmine.lighttpd.net/projects/1/wiki/tutoriallighttpdandphp

The lighttpd server and PHP is running fine. But when i try to upload a file above 61 KB it shows error 413 - request entity too long.
I also changed PHP ini values to post_max_size = 256M , upload_max_filesize = 256M, memory_limit = 1024M etc. But the issue is not resolved. Is there any changes to be done in lighttpd config file ?

Please help me to resolve the issue.


Replies (4)

RE: Request entity too long error while uploading a file above 61KB in PHP - lighttpd - Windows 32-bit and 64-bit binaries by dtech(.hu) - Added by gstrauss over 4 years ago

This probably is not lighttpd. Are you sure that you are running lighttpd? Are you sure that your request is running through lighttpd?

Check the lighttpd error log. If lighttpd sent the 413, there will be an entry in the lighttpd error log.

Yes, lighttpd can limit the request size. See configuration options and search for "max". (Please try simple searches of the configuration options before posting questions like "is there a configuration option ...")

RE: Request entity too long error while uploading a file above 61KB in PHP - lighttpd - Windows 32-bit and 64-bit binaries by dtech(.hu) - Added by gstrauss over 4 years ago

BTW, the Windows build of lighttpd distributed with cygwin is preferred to the one built and distributed by dtech(.hu). dtech(.hu) is not lighttpd.net, is not affiliated with lighttpd.net, and is not sanctioned or supported by lighttpd.net.

RE: Request entity too long error while uploading a file above 61KB in PHP - lighttpd - Windows 32-bit and 64-bit binaries by dtech(.hu) - Added by remya over 4 years ago

I have checked the error log of lighttpd and shows the below log

2019-11-26 10:03:43: (response.c.124) Response-Header: \nHTTP/1.1 413 Request Entity Too Large\r\nContent-Type: text/html\r\nContent-Length: 375\r\nConnection: close\r\nDate: Tue, 26 Nov 2019 04:33:43 GMT\r\nServer: LightTPD/1.4.39-1-IPv6 (Win32)\r\n\r\n

Are you able to help me ?

RE: Request entity too long error while uploading a file above 61KB in PHP - lighttpd - Windows 32-bit and 64-bit binaries by dtech(.hu) - Added by gstrauss over 4 years ago

Probably not. You've posted debug logging. If there is not a line above it indicating that lighttpd produced the 431, then it is more likely that your PHP is misconfigured. If you find that you do need to configure lighttpd.conf, then please re-read my earlier comments.

    (1-4/4)