Page 1 sur 1
limite de taille des fichiers à télécharger
Posté : 04 mai 2010, 12:03
par gui
Bonjour,
Voilà je cherche à augmenter la limite de taille des fichiers à télécharger avec un script html, par default celle-ci est de 2M, je souhaiterai la passer à 10M.
Utilisant xampp sous unix j'ai modifié la fichier php.ini
A la ligne "upload_max_filesize = 2M" j'ai mis 10M.
Et à la ligne "post_max_size" j'ai mis 15M.
Le problème est qu'il n'y a toujours pas de changement, la fichier de taille supperieur à 2Mo ne sont pas chargé.
Je pense qu'il faut que je modifie autre chose mais je ne sais pas quoi ni où malgrès mes recherches.
Merci d'avance
Re: limite de taille des fichiers à télécharger
Posté : 04 mai 2010, 12:12
par visualight
Salut,
As tu redémarrer les services après modification dans le php.ini ?
Voici également une explication des valeurs du php.ini a modifier pour l'upload:
http://www.radinks.com/upload/config.php
Il y a d'autres articles qui en parle sur le net => google ou bing sont tes amis
A+

Re: limite de taille des fichiers à télécharger
Posté : 04 mai 2010, 13:12
par gui
Oui j'ai restart xampp.
Je vais regarder toutes les lignes à modifier mais je ne suis pas certain que le problème vienne du php.ini, il n'y a pas de fichier de config pour apache?
Je recherche ce fichier :" .htaccess " file in your Drupal root directory.
Pour modifier ces 2 lignes:
* php_value upload_max_filesize 10M
* php_value post_max_size 20M
Re: limite de taille des fichiers à télécharger
Posté : 04 mai 2010, 13:31
par visualight
Voilà je cherche à augmenter la limite de taille des fichiers à télécharger avec un script html, par default celle-ci est de 2M, je
A tout hasard, dans ton formulaire d'upload tu n'aurais pas :
<input type="hidden" name="MAX_FILE_SIZE" ... ??
Re: limite de taille des fichiers à télécharger
Posté : 04 mai 2010, 13:39
par gui
Non je ne l'ai pas mis je pense que même si je le met avec une valeur suppérieure à celle de la config, cela ne changera rien car même une fois les valeurs de configs modifiées, le resultat est le même.
Re: limite de taille des fichiers à télécharger
Posté : 04 mai 2010, 13:42
par visualight
Essaye un peu simplement avec un htaccess pour voir :
Code : Tout sélectionner
php_value upload_max_filesize 20M
php_value post_max_size 20M
php_value max_execution_time 200
php_value max_input_time 200
Re: limite de taille des fichiers à télécharger
Posté : 04 mai 2010, 13:46
par gui
?? c'est ce que je cherche depuis tout à l'heure comment acceder à ce ficheir de config "htaccess" je le cherche depuis un bon momant sans succes.
Re: limite de taille des fichiers à télécharger
Posté : 04 mai 2010, 13:53
par macgawel
?? c'est ce que je cherche depuis tout à l'heure comment acceder à ce ficheir de config "htaccess" je le cherche depuis un bon momant sans succes.
Je recherche ce fichier :" .htaccess " file in your Drupal root directory.
Il est à la racine de ton répertoire Drupal
Attention : tu es sous UNIX =>
.htaccess est un fichier caché => visible avec un
ls -a
Re: limite de taille des fichiers à télécharger
Posté : 04 mai 2010, 14:04
par gui
Je dois être un boulet car je ne trouve pas ce fichier Drupal
Re: limite de taille des fichiers à télécharger
Posté : 04 mai 2010, 14:13
par visualight
Si tu ne trouves pas c'est que ton OS l'a chaché.
Va dans les options de tes dossiers et affiche les fichiers cachés.
Si tu ne trouve toujours pas, le voici :
(crée un fichier .htaccess et colle y ceci)
Si ton système te refuse la création d'un .htaccess c'est parce que il y a un "."
Crée alors simplement un fichier htaccess (sans "."), upload le puis modifie son nom après.
Pour moi, le problème d'upload restrea entier car rien n'indique dans le htaccess un override de la config d'upload de php.
Code : Tout sélectionner
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$">
Order allow,deny
</FilesMatch>
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
# Follow symbolic links in this directory.
Options +FollowSymLinks
# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php
# Force simple error message for requests for non-existent favicon.ico.
<Files favicon.ico>
# There is no end quote below, for compatibility with Apache 1.3.
ErrorDocument 404 "The requested file favicon.ico was not found.
</Files>
# Set the default handler.
DirectoryIndex index.php
# 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
</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
</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
</IfModule>
# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
# Enable expirations.
ExpiresActive On
# Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600
<FilesMatch \.php$>
# Do not allow PHP scripts to be cached unless they explicitly send cache
# headers themselves. Otherwise all scripts would have to overwrite the
# headers set by mod_expires if they want another caching behavior. This may
# fail if an error occurs early in the bootstrap process, and it may cause
# problems if a non-Drupal PHP file is installed in a subdirectory.
ExpiresActive Off
</FilesMatch>
</IfModule>
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
# If your site can be accessed both with and without the 'www.' prefix, you
# can use one of the following settings to redirect users to your preferred
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
#
# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
# adapt and uncomment the following:
# RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
# RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment and adapt the following:
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
# RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /drupal
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
# RewriteBase /
# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
# $Id: .htaccess,v 1.90.2.5 2010/02/02 07:25:22 dries Exp $
Re: limite de taille des fichiers à télécharger
Posté : 04 mai 2010, 14:24
par gui
Je le place où précisement ce fichier dans mon repertoire xampp??
Re: limite de taille des fichiers à télécharger
Posté : 04 mai 2010, 14:25
par visualight
Dans le "root" du dossier ou est situé index.php de drupal

Re: limite de taille des fichiers à télécharger
Posté : 04 mai 2010, 14:27
par visualight
NB: le htaccess que j'ai fournis c'est pour la version 6.16 de drupal - dernière version (au cas où)

Re: limite de taille des fichiers à télécharger
Posté : 04 mai 2010, 14:37
par gui
Ok j'ai pas tout compris mais je vais essayer
merci