Upon uploading a more significant file in CWP using the file manager, you may struggle with a file upload error as follows in the log file /usr/local/cwpsrv/logs/error_log.

 

2021/03/12 18:12:58 [error] 2578322#0: *114 client intended to send too large body: 720059757 bytes, client: 117.203.36.77, server: localhost, request: “POST /cwp_7c0f4a5796597df4/testfil/testfil/index.php?module=filemanager&acc=uploadFiles HTTP/1.1”, host: “host.example.com:2083”, referrer: “https://host.example.com:2083/cwp_7c0f4a5796597df4/testfil/fileManager_v2.php”

 

As the screenshot below shows the upload is complete. But the file is not uploaded to the location.

 

With the latest CWP versions of 0.9.8.1064, this error is as follows in the screenshot (file upload maximum limit displayed).


 

The Centos Web Panel employs a separate php.ini file to load the PHP configurations for the control panel interfaces. The default PHP server configuration file is /usr/local/cwp/php71/php.ini of the cwpsrv service for CWP admin panel, CWP user panel, phpMyAdmin, and Roundcube.

(The phpini file is the default configuration file for running applications that require PHP).

To fix this error, you need to edit the CWP PHP configuration. Kindly follow the below-mentioned steps: 

1. On the command line, first backup the php.ini file.

cp /usr/local/cwp/php71/php.ini /usr/local/cwp/php71/php.ini.bak

 

2. Edit the configuration file.

vi /usr/local/cwp/php71/php.ini

 

3. Now, you need to adjust the following PHP configuration directives to upload a bigger file via File manager.

I was hoping you could find the following and change to your size, and in this case, I am using 150MB for upload_max_filesize.

upload_max_filesize: By default it's value is 64MM. You need to raise it to the maximum size of a single file that we need to upload.

post_max_size: It specifies the maximum size of POST data that PHP will admit. This value should be higher than 'upload_max_filesize'.

memory_limit: This sets the amount of memory a PHP script is provided to use during its execution. Set this to a value greater than 'post_max_size' so that the PHP script can load and process the uploaded file.

max_input_time: This sets the maximum time in seconds a script can parse input data, like POST and GET. Timing begins at the moment PHP is invoked at the server and ends when execution begins. It includes populating $_FILES superglobal.

max_execution_time: The time a script is allowed to run after its input has been parsed. That would include any processing of the file itself.

upload_max_filesize = 100M post_max_size = 150M memory_limit = 150M max_input_time = 90 max_execution_time = 90

 

4. This done. Just save your file and restart CWP.

sh /scripts/restart_cwpsrv

 

¿Fue útil la respuesta? 0 Los Usuarios han Encontrado Esto Útil (0 Votos)