Website construction: Use PHP upload Large file configuration method as follows:Open the php.ini,1. First find the file uploads region, there are several parameters that affect the upload of files:File_uploads = on; can allow the switch to upload files via HTTP. Acquiescence is on, which is openupload_tmp_dir; file upload to the server where temporary files are stored, assuming that the system will acquiesce to the temporary folder if not specifiedUpload_max_filesize =
There are a variety of solutions, the following I based on the different permissions of the webmaster to introduce
Have server Admin permissions to modify php.ini files
Can be directly in the php.ini memory_limit = 8M; Increase to 12M or greater. (Note: M is not MB in the back)
No Server Admin Permissions
1.php directly modify memory but you need PHP to support the Ini_set function, this method will not work if the function is prohibited in php.in
too large" error. and close the connection. For some clients, if the communication packet is too large, a "lost connection to the MySQL server" error may be encountered during query execution. The default value is 16M.
#dev-doc:http://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html
Max_allowed_packet = 32M
# sort_buffer_size is a connection-level parameter that allocates the set of memory at a time when each connection (session) needs to use this Buffer for the first time.
#Sort_Buffe
:1, first in the service to shut down the IIS Admin Service services.2, find windows/system32/inetsrv/under the MetaBase.xml file.3, with WordPad Open, find aspbufferinglimit to change it to the desired value (the default is: 4194304, that is: 4MB).4, save, and then restart the IIS Admin Service services, restart IIS.
Second, PHP part1, find post_max_size, refers to the form post to PHP can receive the maximum value, including all the values in the form, the default is
modification of the php.ini file.
Find PHP.ini Search these 3 places
1, find post_max_size, refers to the form post to PHP can receive the maximum value, including all the values in the form, the default is 8M, see you need to change.
2, look for file uploads, first confirm file_uploads = on; whether to allow the switch to upload files via HTTP, by default on is open. Upload_tmp_dir;
Find Upload_max_filesize, the maximum size that is allowed to uplo
Key_buffer_size + (read_buffer_size + sort_buffer_size) *max_connections = 458624 K
Read_buffer_size: Is the MySQL read into the buffer size. A request to sequentially scan a table allocates a read buffer, which is allocated a memory buffer by MySQL. The read_buffer_size variable controls the size of this buffer. If the sequential scan request for a table is very frequent, and you think that frequent scans are too slow, you can improve performance by increasing the value of the variable and t
total sorted buffer size that is actually allocated is 100x6 = 600MB. Therefore, for the existence of around 4GB server recommended set to 6-8m.
record_buffer=16m//Each thread scanned by a sequential scan allocates a buffer of this size to each of its scanned tables, which can be set to more than 2M
Table_cache = 512//Opens the number of tables for all threads. Increasing this value can increase the number of file descriptors required by mysqld. MySQ
, B, this time B can be recovered normally. When you want to recycle A, D will not be mistaken for a to be recycled. How should we explain the problem?Obviously, it is not actually mentioned above, because there is a very important attribute in the thread stacksize, it makes us vaguely feel that the thread is a private stack space, if so, the ABCD stack out of the stack is not a problem, because they are not saved together.
Pthread Line Stacks
#include
Operation Result:
StackSize (8388608)
, you need to increase the value of this parameter, which specifies the size of the listening queue for incoming TCP/IP connections.Different operating systems have its own limitations on this queue size. Attempting to set a limit of back_log above your operating system will be invalid. The default value is 50.For Linux systems, the recommended setting is an integer less than 512.
Key_buffer_size = 256M
#key_buffer_size指定用于索引的缓冲区大小, increase it to get better index processing performance. Th
socket =/usr/local/mysql/tmp/mysql.sock #Mysql define where sock is storedBack_log = #在MySQL的连接请求等待队列中允许存放的最大连接请求数. System default value is 50Max_connections = #最大并发连接数, increasing this value requires a corresponding increase in the number of file descriptors allowed to open max_connect_errors = #如果某个用户发起的连接error超过该数值, the next time the user's connection will be blocked, Table_open_cache = 2048 # Table_open_cache: Table descriptor cache size to reduce file open/close timesMax_allowed_packet = 1
This section is referenced from: http://www.myhack58.com/Article/sort099/sort0102/2011/29396.htmThe original text has a small number of errors or outdated (relative to ubuntu15) content, has been modified.PHP.ini path in Ubuntu is not the same as other Linux, the path is:/etc/php5/apache2/php.inisudo gedit/etc/php5/apache2/php.ini1, find post_max_size, refers to through the form post to PHP can receive the maximum value, including all the values in the form, the default is
Open PHP.ini, first findFile_uploads = on; switch to allow uploading of files over HTTP. The default is on, which is openUpload_tmp_dir; files uploaded to the server where temporary files are stored, if not specified, will use the system default temporary folderUpload_max_filesize = 8m; Hope business, that is, the maximum size allowed to upload files. Default is 2MPost_max_size = 8m; The maximum value that
:31 2013] [Notice] Child 2964:starting, worker threads.[Thu APR 11 18:31:31 2013] [Notice] Child 2964:listening on port 80.
After reviewing the official Apache and the Forum information, found that the win platform with regular preg_match_all or preg_match analysis of a longer string, the cause of the Apache crash Restart is the default allocated thread stack space under the Windows platform Threadstacksize is too small to cause. Win32 default is only 256KB, and in Linux the default value is
upload file switch, the default is on is open
Ini_set (' file_uploads ', ' on ');
The time to receive data via post, get, and put is limited to 90 seconds default value: 60
Ini_set (' Max_input_time ', ' 90 ');
The script execution time is changed from the default of 30 seconds to 180 seconds.
Ini_set (' max_execution_time ', ' 180 ');
The post variable is changed from 2M to 8M, and this value is larger than upload_max_filesize
Ini_set (' post_max_si
to define memory usage limits. Specify the maximum amount of memory that a single script can use by using the Memory_limit variableThe value of the variable memory_limit should be appropriately greater than the value of post_max_sizeImplementation of PHP Large file upload, a simple configuration example:1: Open php.ini, first findFile_uploads = on; switch to allow uploading of files over HTTP. The default is on is open Upload_tmp_dir, the file is uploaded to the server where temporary files are
array for PHPPlease refer below email,Jacky Zhang wrote:> Hi Valery,>> It ' s fine if I using Nginx upload module to upload a Signle file.> But It look incorrect so when I use a input like this:>>>> Do I have any suggestion?No, arrays won ' t work and you have to list every file input field individually.--Best regards,Valery KholodkovQuestion 3: How to limit the size of uploaded filesHttp://wiki.nginx.org/HttpCoreModule#client_max_body_sizePHP.ini to set theFile_uploads on whether to allow the
PHP Run Tip: Fatal error allowed memory size solution, fatalallowed
The example in this article tells the PHP run prompt: Fatal error allowed memory size is not enough to resolve. Share to everyone for your reference. Here's how:
Some friends new configuration of the environment or their own newly written program run will encounter fatal error:allowed memory size of 134217728 bytes exhausted error, this problem is not written by the program caused, Another is the environment configuration is no
PHP.ini can't upload big file perfect solution
1, open the php.ini (open the way needless to say, Baidu a lot of)
2. Find Post_max_sizeThe form submits the maximum number, which is not a restriction on the size of an individual file to upload, but rather a restriction on the submission data for the entire form.The default is 8M, set to the value you want, this parameter is recommended to set larger than upload_max_filesize
3. Find File UploadsWheth
Apache and the Forum data, found that the win platform with regular preg_match_all or preg_match analysis of the longer string, causing the Apache crash restart because the Windows platform under the default allocated thread stack space Threadstacksize is too small to cause. Win32 default is only 256KB, and in Linux, the default is 8M, which is why the same program under the Linux platform Normal, and in the win platform under the abnormal reasons.
attachment steps:
1. Close the IIS Admin Service services in the service first.
2. Find the MetaBase.xml file under windows/system32/inetsrv/.
3, open with WordPad, find aspbufferinglimit to modify it to the desired value (the default is: 4194304, that is: 4MB).
4. Save the IIS Admin Service and restart IIS.
Second, the PHP part
1, find post_max_size, refers to through the form post to PHP can receive the maximum value, including all the values in the form, the default is
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.