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 in the Upload_tmp_dir, Upload_max_filesize, post_max_size and other options, the following one by one instructions.
Open php.ini configuration file to find file uploads
File_uploads = On
HTTP file uploads are allowed by default, and this option cannot be set to OFF.
Upload_tmp_dir =
The default is NULL,
Max_heap_table_size = 64M
#为每个线程分配的排序缓冲大小
Sort_buffer_size = 8M
#join the buffer size of the table operation, set according to the actual business, default 8M
Join_buffer_size = 32M
#操作多少个离开连接的线程的缓存
Thread_cache_size = 8
#并发线程数量, the default is 8, can be appropriately increased to twice times within. If you have more than one CPU, you can multiply the number of CPUs. The dual-core CPU can multiply
with the type ' of local Management-autoall Ocate or Uniform-and the values of minextents, NEXT and Pctincrease, to determine the initial size.
(1) With autoallocate extent management, Oracle uses the INITIAL setting to optimize the number of extents allocated. Extents of 64K, 1M, 8M, and 64M can be allocated. During segment creation, the system chooses the greatest of these four sizes ' is ' equal to or smaller than, and Allocates as many extents o
useMax_binlog_cache_size = 64M#MySql读入缓冲区大小 default value 2M optimized to 4MRead_buffer_size = 8M# Random Read data buffer 8M optimized to 32M using memory default valueRead_rnd_buffer_size = 128M#排序缓存 default value 2M optimized to 4MSort_buffer_size = 8M#联合查询 1MJoin_buffer_size = 1048576Buffer size to use when #设置, restore, and modify tablesMyisam_sort_buffer_s
least 1:100,1:1000 better (the above status values can be obtained using the show status like ' key_read% ') Probability of missing cache: Key_cache_miss_rate = key_reads/key_read_requests*100% key_buffer_size only works on Maisam tables. How to adjust the value of key_buffer_size default configuration number when 8388608 (8M), the host has 4G memory can be tuned to 268435456 (256M) 5, query_cache_size (query cache abbreviation QC) using the quer
phpMyAdmin The default Import database file size is 2M, but the general Web site's database exported files will exceed this limit, to import more than 2M database files need to manually modify the php.ini configuration file! Recent projects encountered this problem, by the way to record the solution, I hope to be helpful to everyone.In the php.ini file, modify:upload_max_filesize 8M(that is, the maximum allowable upload file size, the default is 2M, m
open_tables #和 opened_tables (where Open_tables is the number of tables opened before #, O Pened_tables is the number of tables that are already open). That is, if Open_tables is close to Table_cache and #且Opened_tables这个值在逐步增加, consider increasing the size of the # value. There is table_locks_waited higher than the time, also need to increase the table_cache. external-locking = FALSE #使用 –skip-external-locking mysql option to avoid external locking. This option is turned on by default Max_all
By default, the parameters of the InnoDB are set very small and are not enough in the production environmentFor example, the two most important parametersInnodb_buffer_pool_size default is 8MInnodb_flush_logs_at_trx_commit The default setting is 1, which is synchronous flush log (so to understand)Innodb_buffer_pool_size: This is the most important setting for InnoDB, which has a decisive impact on InnoDB performance. The default setting is only 8M, so
) + max_connections * 2 MB #每个线程将使用2MB (MySQL AB binary version is a KB) stack, in the worst-case scenario, Sort_buffer_size + record_buffer_size Additional memory is also used. Can be changed to 512M #innodb_buffer_pool_size = 16M #主要用来存储表结构和数据字典, the more tables require more memory, you can change to 16M#innodb_additional_mem_pool_size = 2M#日志组中的每个日志文件的大小(in megabytes). If n is the number of log files in the log group (Innodb_log_files_in_group), the ideal value is 1M to the buffer
) lamp, in order to allow PHP page upload not more than 8M of files,/etc/php.ini How to configure?A) upload_max_filesize=8mB) post_max_size=8mC) File_uploads=onD) Anon-upload_enable=yesYou can test how much you know about Linux systems.Answer:(1) CResolution: Bridge mode: The guest and host are connected on the same switch, and the physical network card is bridged, which is equivalent to connecting directly to the host. Isolation mode: Guest can acces
created_tmp_disk_tables to know the details.
Examples are as follows:
Mysql> Show variables like ' key_buffer_size ';+-----------------+-----------+| variable_name | Value |+-----------------+-----------+| Key_buffer_size | 536870912 |+-----------------+-----------+1 row in Set (0.00 sec)Key_buffer_size is 512MB, let's take a look at the use of key_buffer_size:
Mysql> show global status like ' key_read% ';+-------------------+-------------+| variable_name | Value |+-------------------+------
Php+apache solve the problem of uploading files too bigBlog Category:
Php
Phpapache upload files with Php+apache, because the file is too large, easy to cause upload failure, the solution:Modify the php.ini:Upload_max_filesize 2m is the maximum amount of file size allowed to upload. The default is 2M, the size can be based on yourneeds to be modified.Post_max_size 20m refers to the maximum value that can be received by a form post to PHP, including allValue. The default is
processed by indexing (for all read and multiple writes), to the extent that you can afford that much. If you make it too big, the system will start to change pages and it really slows down. The default value is 8388600 (8M), my MySQL host has 2GB memory, so I changed it to 402649088 (400MB). (4), Max_connections:The number of simultaneous customers allowed. Increase this value to increase the number of file descriptors required by mysqld. This numbe
upload of large volume files when there are errors. This involves PHP's configuration file--php.iniIn this configuration file, there are several values that are closely related to file uploads:
File_uploads = ON//whether to allow system support file upload
Upload_tmp_dir//Temporary file storage path, Linux under the system default path, Win32 need to specify
Upload_max_filesize = 2m//allow maximum file upload volume
Post_max_size = 2m//The maximum data capacity that PHP can acce
Asp.net| Error
1. Maximum request length exceeded
Test upload file code, default ASP. NET allows the largest upload of 2M file size, I upload a netease bubble in their own server installation program POPO.exe file when this error occurred.
Reference articles:
In asp.net, the default size for uploading files is 4096 KB, which is 4M, but you can change this data in Web.config.
Then it is 8M file, of course, you can also modify it larger, but no matter
Open PHP.ini, ctrl+f find the following items and modify them. The following 100M for example.
File_uploads = on; whether to allow the switch to upload files over HTTP. The default is on, which is open
Upload_tmp_dir files are uploaded to the server where temporary files are stored, and the system default temporary folder is used if unspecified
Upload_max_filesize = 100m business, that is, the maximum size of the upload file allowed. The default is 2M
Post_max_size = 100M refers to the maxim
is read in ascending order.
Experiment: The same session insert two statements, another new session to insert a new session, through the Dbms_rowid view of the row in the block of data, you will find the same conversation under the same piece, different sessions do not insert the same piece. It's too easy to get out of the towel.
Two, high water level and putfree value caused by improper performance problem--hot block causes buffer busy waits wait event
Insert a piece of data, will only use
configuration; $ cd ~/ke rnel/linux-3.14 $ make Menuconfig file systems---> Pseudo file Systems---> [*] Virtual Memory file system support (former SHM FS) [*] Tmpfs P Osix Access Control Lists recompile kernel: $ make uimage $ CP arch/arm/boot/uimage /tftpboot (3) Go back to the file system you created, create the INIT.D directory under etc, and create the RCS file under INIT.D, with the contents of the RCS file: #!/bin/sh # this is The first script called by Init process/bin/mount-a ECHO/SBIn
"packet too large" error. and close the connection. For some clients, if the communication packet is too large, you may encounter a "missing connection to the MySQL server" error during query execution. The default value is 16M.#dev-doc:http://dev.mysql.com/doc/refman/5.5/en/packet-too-large.htmlMax_allowed_packet = 32M# sort_buffer_size is a connection-level parameter that allocates the set of memory once for the first time each connection (session) needs to use this Buffer.#Sort_Buffer_Size i
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.