To modify the php.ini file:
file_uploads on 是否允许通过HTTP上传文件的开关。默认为ON即是开upload_tmp_dir – 文件上传至服务器上存储临时文件的地方,如果没指定就会用系统默认的临时文件夹upload_max_filesize 8m 望文生意,即允许上传文件大小的最大值。默认为2Mpost_max_size 8m 指通过表单POST给PHP的所能接收的最大值,包括表单里的所有值。默认为8Mmax_execution_time 600 每个PHP页面运行的最大时间值(秒),默认30秒max_input_time 600 每个PHP页面接收数据所需的最大时间,默认60秒memory_limit 8m 每个PHP页面所吃掉的最大内存
To modify the ng
= 50M.However, only setting upload_max_filesize = 50M will not enable uploading of large files, and we must also modify the Post_max_size option in the php.ini file.
Continue to find Data handling in php.ini, there are 1 options in this area:
Post_max_size = 8M
Refers to the maximum value that can be received by a form post to PHP, including all values in the form. The default is 8M. If the post data excee
1. Open php.ini2. Find Post_max_size (the maximum number of form submissions, which is not to limit the size of individual files being uploaded, but to limit the submission data for the entire form); default is 8M, set to the value you want3. Find the file uploads (switch to allow uploading of files over HTTP); Confirm file_uploads = On4. Find Upload_tmp_dir (file upload to the server where temporary files are stored, if not specified will use the sys
ways to compensate:
Perl-based Project Filechucker, Xupload, Uber-uploader Flash-based project SWFUpload and a package with PHP directly on the server to build a beautiful socket link
But after all, I hope that one day I can see the thorough robust uploading scheme based on HTML only, I hope this day will not be too far.Finally, this time the code download.php File Upload size settings explained in PHP to upload files, the most problematic is to upload large volume files when an error occurs.
an error occurs. This involves the PHP configuration file--php.iniIn this configuration file, there are several values that are closely related to file uploads:
File_uploads = ON//allows system support for file uploads
Upload_tmp_dir//Temporary file storage path, Linux is the system default path, Win32 need to specify
Upload_max_filesize = 2m//Allow file upload maximum volume
Post_max_size = 2m//The maximum amount of data that PHP can accept when given to PHP via the Post m
this directory writable permissions. how to upload more than 8M The big file? Uploading large files mainly involves configuring the upload_max_filesize and post_max_size two options.PHP.ini the default file upload size in the config file for 2m,php beginners is prone to make a mistake when writing the file upload function by setting the maximum size of the upload file area, that is, the maximum number of files allowed to upload, max_file_ The value
One, Nginx serverNginx This problem occurs because the request entity is too long. It is common to have a POST request when the body content post data is too large,such as uploading large files too large, post data more.Processing methodsIn nginx.conf add client_max_body_size settings, this value defaults to 1m, can be increased to 8m to increase the file size limit, of course, you can set a larger point.The code is as follows:# Modify the following c
PHP.ini into the modified
File_uploads = on; whether to allow the switch to upload files over HTTP. The default is on, which is openUpload_tmp_dir files are uploaded to the server where temporary files are stored, and the system default temporary folder is used if unspecifiedUpload_max_filesize = 8m business, that is, the maximum size of the upload file allowed. The default is 2MPost_max_size = 8m refers t
Unblock phpmyadmin import file by 2M Max limit
In the usual development of the application often meet the need to import a database larger than the phpmyadmin limit of 2M, how to solve? Please see belowModify the C:\windows\php.ini file.If it is a Win2000 machine, it should be c\winnt\php.ini, open the php.ini file with WordPad: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
reference is declared.Run the above code, and then perform the click button again, you can see the memory will also rise to about 8M, click to rise to about 16M again, but after the return button is pressed and the garbage collection operation, allocated + Free total space has not been back to about 2M, But has been hovering around 8M to indicate the existence of memory leaks!!! But why would it be
important!Blank=[fast|all]:blank to erase repeatable write CD/DVD-RW, use fast faster, all is more complete-format: Only DVDs for DVD+RW in this format;The available options feature is primarily the option to write to the CD/DVD, and common options include:-data: Specifies that subsequent files are written in data format, not in CD tracks (-audio)Speed=x: Specifies the burning speed, for example, the CD is available with a speed=40 of 40 times times, and the DVD is available speed=4-eject: Spec
This article mainly describes the PHP file upload with the relevant configuration of knowledge points. PHP File Upload function Configuration mainly involves the php.ini configuration file upload_tmp_dir,upload_max_filesize,post_max_size and other options, The following one by one explains.
Open php.ini configuration file to find File Uploadsfile_uploads = onHTTP file uploads are allowed by default, and this option cannot be set to OFF. Upload_tmp_dir =The default is NULL, this option in the
, you must give this option to assign values, such as Upload_tmp_dir = '/ LEAPSOULCN ', the representative in the C disk directory has a LEAPSOULCN directory, and session configuration like, if you are in the Linux environment, you must give this directory writable permissions.
How do I upload a large file over 8M?
Uploading large files mainly involves configuring upload_max_filesize and post_max_size two options.
Default file upload size in php.
*********************************************** Statement **********************************************
Original works, from the "Blue Blog" blog, Welcome to reprint, please be sure to indicate the source, otherwise the legal liability for copyright.
There is a mistake in the statement, please leave a message or mail (hyldba@163.com) specified, be grateful.
This reprint must be retained here: http://blog.csdn.net/huangyanlong/article/details/39216791
Blue Blog:http://blog.csdn.net/huangyanlong.
, so we need to set the following:
Sysctl-w kernel.pid_max=65535
Maximum number of threads
The maximum number of threads for a single process in a Linux system has its maximum limit Pthread_threads_max
This restriction can be viewed in/usr/include/bits/local_lim.hFor linuxthreads This value is generally 1024, there is no hard limit for NPTL, only limited by the resources of the system
The resource of this system is mainly the memory occupied by the thread stack, with ulimit-s can see the defa
-variable = innodb_additional_mem_pool_size=2m# Set ... _log_file_size to% of buffer pool size#set-variable = innodb_log_file_size=5m#set-variable = innodb_log_buffer_size=8m#innodb_flush_log_at_trx_commit =1#set-variable = innodb_lock_wait_timeout=50[Mysqldump]QuickSet-variable = max_allowed_packet=16m[MySQL]No-auto-rehash# Remove The next comment character if you are not familiar with SQL#safe-updates[Isamchk]Set-variable = key_buffer=8mSet-variable
/log/mysql.errLog_output = File #参数log_output指定了慢查询输出的格式, the default is file, you can set it to a table, and then you can query the MySQL architecture under the Slow_log table# Slow Query LogSlow_query_log = 1Long-query-time = 1 #慢查询时间 more than 1 seconds slow querySlow_query_log_file =/home/mysql/mysql/log/slow.log#log-queries-not-using-indexes#log-slow-slave-statementsGeneral_log = 1General_log_file =/home/mysql/mysql/log/mysql.logMax_binlog_size = 1GMax_relay_log_size = 1G# If use Auto-ex, s
First, Nginx server
Nginx This problem occurs because the request entity is too long. The general occurrence of a POST request is that the body content post data is too large,such as uploading large files too large, post data is more.Processing methods
In nginx.conf add client_max_body_size settings, this value defaults to 1m, can be increased to 8m to increase the file size limit, of course, you can set a larger point.
Copy Code code as fol
not the larger the better, because it is connection-level parameters, too large settings + high concurrency may deplete the system memory resources. For example: 500 connections will consume 500*sort_buffer_size (8M) =4g memoryWhen the #Sort_Buffer_Size exceeds 2KB, mmap () instead of malloc () is used to allocate memory, resulting in lower efficiency.#技术导读 http://blog.webshuo.com/2011/02/16/mysql-sort_buffer_size/#dev-doc:http://dev.mysql.com/doc/re
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.