Ampliar memory_limit, post_max_size, upload_max_filesize en Drupal
A menudo tendremos que ampliar estos valores en nuestra instalación de Drupal, ya sea para aumentar el tamaño permitido de los archivos subidos al servidor a través de un campo CCK o porque así nos lo indique en el status report de nuestra instalación, ya que algunos módulos como ImageCache necesitan valores más altos. Hay tres métodos para ampliar los valores, que pueden usarse por separado o conjuntamente:
.htaccess (en la raiz del sitio web)
añade las siguientes lineas:
# PHP 5, Apache 1 and 2. <IfModule mod_php5.c> php_value magic_quotes_gpc 0 php_value register_globals 0 php_value session.auto_start 0 php_value mbstring.http_input pass php_value mbstring.http_output pass php_value mbstring.encoding_translation 0 php_value memory_limit 96M php_value upload_max_filesize 64M php_value post_max_size 64M </IfModule>
En teoria también puedes añadirlas al principio del archivo o en los otros IfModule, depende de la configuración de tu servidor.
Ejemplo:
# Override PHP settings. More in sites/default/settings.php # but the following cannot be changed at runtime. # PHP 4, Apache 1. <IfModule mod_php4.c> php_value magic_quotes_gpc 0 php_value register_globals 0 php_value session.auto_start 0 php_value mbstring.http_input pass php_value mbstring.http_output pass php_value mbstring.encoding_translation 0 php_value memory_limit 96M php_value upload_max_filesize 64M php_value post_max_size 64M </IfModule> # PHP 4, Apache 2. <IfModule sapi_apache2.c> php_value magic_quotes_gpc 0 php_value register_globals 0 php_value session.auto_start 0 php_value mbstring.http_input pass php_value mbstring.http_output pass php_value mbstring.encoding_translation 0 php_value memory_limit 96M php_value upload_max_filesize 64M php_value post_max_size 64M </IfModule> # PHP 5, Apache 1 and 2. <IfModule mod_php5.c> php_value magic_quotes_gpc 0 php_value register_globals 0 php_value session.auto_start 0 php_value mbstring.http_input pass php_value mbstring.http_output pass php_value mbstring.encoding_translation 0 php_value memory_limit 96M php_value upload_max_filesize 64M php_value post_max_size 64M </IfModule>
php5.ini (en la raiz del sitio web, si no tienes el archivo puedes crear uno)
añade las siguientes lineas:
memory_limit = 96M post_max_size = 64M upload_max_filesize = 64M
En el settings.php (dentro del directorio sites/default de tu instalación de Drupal)
añade las siguientes lineas debajo del apartado PHP settings:
ini_set('memory_limit', '96M');
ini_set('post_max_size', '96M');
ini_set('upload_max_filesize', '96M');
Ejemplo:
/**
* PHP settings:
*
* To see what PHP settings are possible, including whether they can
* be set at runtime (ie., when ini_set() occurs), read the PHP
* documentation at http://www.php.net/manual/en/ini.php#ini.list
* and take a look at the .htaccess file to see which non-runtime
* settings are used there. Settings defined here should not be
* duplicated there so as to avoid conflict issues.
*/
ini_set('arg_separator.output', '&');
ini_set('magic_quotes_runtime', 0);
ini_set('magic_quotes_sybase', 0);
ini_set('session.cache_expire', 200000);
ini_set('session.cache_limiter', 'none');
ini_set('session.cookie_lifetime', 2000000);
ini_set('session.gc_maxlifetime', 200000);
ini_set('session.save_handler', 'user');
ini_set('session.use_cookies', 1);
ini_set('session.use_only_cookies', 1);
ini_set('session.use_trans_sid', 0);
ini_set('url_rewriter.tags', '');
ini_set('memory_limit', '96M');
ini_set('post_max_size', '64M');
ini_set('upload_max_filesize', '64M');
En general con uno solo de los métodos debería bastar, pero si quieres asegurarte, añade el codigo a los tres archivos, de este modo te asegurarás que funcione, es menos administrable pero funciona bien.
Adjunto un ejemplo basico de los tres archivos. El archivo modelo.htaccess solo hay que renombrarlo a .htaccess y el archivo settings.php_.txt renombrarlo a settings.php, si usas nuestro archivo settings.php recuerda poner tus datos de la base de datos, o en cualquier caso hacer una copia de seguridad de tu archivo antes de sobreescribirlo.


Comentarios
answer this post
yUSpwyGnIlcQyzYhCNE
zojuNfUzKsIPiCb
HTpINmYDDNgrSB
RGuLarRZCxBzh
sHnFRdeqSb
telephone service backlinks services
NKRKYCunPZnzTzidF
JroDuALiqopS
hello all to you
buy valium online
quity thode
Cheap Beauty Mineral cosmetics Quelp
If you want to make
order viagra online in australia
throughout prednisone buy for dogs no prescription
use prednisone order online no prescription
Den som har culprit 7b47 med potensen
prednisone buy need online prescription without
levothyroxine buy order uk online
buy synthroid cheap no rx online
Den som har mind-boggler 6f44 med potensen
improve search engine ranking backlink services
discount lisinopril to buy online no prescription
default
default
exhibition stand
signal lamp
rsgVgSXCkXipRvQT
KquJbUOEtyTZru
zfuFBvxeigimKs
FvTiijZYPPZetIMP
OsjJLrfFsI
hHQWYLOhgSr
eCdciOMpfDlbWQOMl
dgqsMsAcMbF
[url=http://www.30noticias
tirer des traits paroles
sualgs
leHAQCiHEpZZvCGt
default
KOSLyrEsrQgf
KOSLyrEsrQgf
ObmOtvucFzYmRP
ObmOtvucFzYmRP
KrtcffWCsWKusH
utLwzjCUPEjodoIlr
stbREGXsAZNX
unlock iphone 4 baseband 4.11.08 or iphone explodes flight
aids to help quit smoking or quit smoking support groups
Añadir nuevo comentario