Upload media error if PHP upload_max_filesize is in GigaByte [solved]
Pluxml 5.1.5
PHP ini "upload_max_filesize" set to 2 Gigabyte (2G)
Go to admin/media
Uploading an image or a document raise an error L_PLXMEDIAS_WRONG_FILESIZE
because missing "G" case on $maxUpload eval in __construct function on class.plx.medias.php
Result is $this->maxUpload = 0; so the test
if($file > $this->maxUpload) on line 294 fails and raise error.
Add the following line
elseif(substr_count($maxUpload, 'G')) $this->maxUpload = str_replace('G', '', $maxUpload) * 1024 * 1024 * 1024;
to class.plx.medias.php at line 57 solve the problem (-;
PHP ini "upload_max_filesize" set to 2 Gigabyte (2G)
Go to admin/media
Uploading an image or a document raise an error L_PLXMEDIAS_WRONG_FILESIZE
because missing "G" case on $maxUpload eval in __construct function on class.plx.medias.php
Result is $this->maxUpload = 0; so the test
if($file > $this->maxUpload) on line 294 fails and raise error.
Add the following line
elseif(substr_count($maxUpload, 'G')) $this->maxUpload = str_replace('G', '', $maxUpload) * 1024 * 1024 * 1024;
to class.plx.medias.php at line 57 solve the problem (-;
Connectez-vous ou Inscrivez-vous pour répondre.
Réponses
Thank You
Consultant PluXml
Ancien responsable et développeur de PluXml (2010 à 2018)