News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Incorporação de videos

Started by Rodrigo Nogueira, March 10, 2010, 02:24:38 PM

Previous topic - Next topic

Edwar Colt

#40
Aproveitando o tpc.

Sobre edição da cota base de 2M p/upload de arquivos e 8M p/post no arquivo php.ini.

basta alterar os valores p/qualquer número conveniente ou existe um relação exata entre essas proporções?

Exemplo: Nesse ponto que destaquei em vermelho. os valores estavam originalmente em 8 onde está em 800 e 2 onde aumentei p/200.


Quote> Maximum size of POST data that PHP will accept.
post_max_size = 800M

; This directive is deprecated.  Use variables_order instead.
gpc_order = "GPC"

; Magic quotes
;

; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off

; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_runtime = Off   

; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = Off

; Automatically add files before or after any PHP document.
auto_prepend_file =
auto_append_file =

; As of 4.0b4, PHP always outputs a character encoding by default in
; the Content-type: header.  To disable sending of the charset, simply
; set it to be empty.
;
; PHP's built-in default is text/html
default_mimetype = "text/html"
default_charset = "UTF-8"

; Always populate the $HTTP_RAW_POST_DATA variable.
;always_populate_raw_post_data = On


;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2" 
include_path = ".:/usr/lib/php:/usr/local/lib/php";
;
; Windows: "\path1;\path2"
;include_path = ".:/usr/lib/php:/usr/local/lib/php"   ;

; The root of the PHP pages, used only if nonempty.
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
; if you are running php as a CGI under any web server (other than IIS)
; see documentation for security issues.  The alternate is to use the
; cgi.force_redirect configuration below
doc_root =

; The directory under which PHP opens the script using /~username used only
; if nonempty.
user_dir =

; Directory in which the loadable extensions (modules) reside.
;extension_dir = "./"
;extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20020429"
zend_extension_ts="/usr/local/IonCube/ioncube_loader_lin_5.2_ts.so"

; Whether or not to enable the dl() function.  The dl() function does NOT work
; properly in multithreaded servers, such as IIS or Zeus, and is automatically
; disabled on them.
enable_dl = On

; cgi.force_redirect is necessary to provide security running PHP as a CGI under
; most web servers.  Left undefined, PHP turns this on by default.  You can
; turn it off here AT YOUR OWN RISK
; **You CAN safely turn this off for IIS, in fact, you MUST.**
; cgi.force_redirect = 1

; if cgi.nph is enabled it will force cgi to always sent Status: 200 with
; every request.
; cgi.nph = 1

; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape
; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
; will look for to know it is OK to continue execution.  Setting this variable MAY
; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
; cgi.redirect_status_env = ;

; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI.  PHP's
; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
; what PATH_INFO is.  For more information on PATH_INFO, see the cgi specs.  Setting
; this to 1 will cause PHP CGI to fix it's paths to conform to the spec.  A setting
; of zero causes PHP to behave as before.  Default is zero.  You should fix your scripts
; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
; cgi.fix_pathinfo=0

; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate
; security tokens of the calling client.  This allows IIS to define the
; security context that the request runs under.  mod_fastcgi under Apache
; does not currently support this feature (03/17/2002)
; Set to 1 if running under IIS.  Default is zero.
; fastcgi.impersonate = 1;

; cgi.rfc2616_headers configuration option tells PHP what type of headers to
; use when sending HTTP response code. If it's set 0 PHP sends Status: header that
; is supported by Apache. When this option is set to 1 PHP will send
; RFC2616 compliant header.
; Default is zero.
;cgi.rfc2616_headers = 0


;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =

; Maximum allowed size for uploaded files.
upload_max_filesize = 200M


'

Achei mais esse resorce limits um pouco acima dessa parte do código que citei.

QuoteResource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 30     ; Maximum execution time of each script, in seconds
max_input_time = 60   ; Maximum amount of time each script may spend parsing request data
memory_limit = 8M      ; Maximum amount of memory a script may consume (8MB)

Mais Três valores.

'

Edwar Colt

Liguei p/meu servidor que me passou os valores adequados pra evitar problemas na hora de fazer o upload dos arquivos de vídeo entre outros permitidos na galeria aeva.

Fica aí como referência do meu servidor, mas pode ser diferente de outros. No caso, trabalho com a insite.

Valores de Referência do php.ini fornecido pela insite.

QuoteMaximum size of POST data that PHP will accept.
post_max_size = 20M

Maximum allowed size for uploaded files.
upload_max_filesize = 50M

Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 90     ;
max_input_time = 60   ;
memory_limit = 100M      ; Maximum amount of memory a script may consume (100MB)

'

Advertisement: