WebsiteBaker Support (2.12.x) > Modules

OneForAll - Img upload [266] A file matching the name you entered already exists

(1/4) > >>

CodeALot:
* WB 2.12.2 r378
* Using OFA 2.0.2.23
* Plupload.min.js version v2.2.0
* Image resize on or off makes no difference
 
Whenever I try to upload a rather large file, I get the error


--- Code: --- 266 A file matching the name you entered already exists

--- End code ---

When I then save the record, the image I uploaded shows as a thumbnail, but is only partially uploaded.
It's probably something in the hosting settings because some websites have this problem, others don't. Does anyone have any idea where to look?

dbs:

--- Quote from: CodeALot ---Yeah, I resize the images now before uploading ...
--- End quote ---
https://forum.WebsiteBaker.org/index.php/topic,31547.msg220811.html#msg220811

Resize more  :)
Your hoster allow maybe only 2MB

CodeALot:
In the CONFIG.PHP of OFA is a definition of the maximum filesize (last lines in the file), why isn't that "kicking in" when I try to upload a too large file then? :-)

dbs:
You mean this?

--- Code: ---// Plupload max file size in MB
//$max_file_size           = 2;
\preg_match('/^\s*([0-9]+)([a-z])?\s*(_)?\s*$/i', ini_get('upload_max_filesize').'_', $aMatch);
$max_file_size = (int)$aMatch[1];
--- End code ---

The original was the commented part

--- Code: ---$max_file_size           = 2;
--- End code ---
Maybe it helps you use this part and comment out the other two lines.

jacobi22:
for example: on my private servers, the upload limit (upload_max_filesize) is set to 200Mb by default. the most of my customers has a upload_max_filesize with 128Mb

i can set OFA to this upload_max_filesize (200 Mb), but i can set also a limit in OFA, maybe 10Mb. With 200Mb-Limit, you can send only one single file (with 200 Mb),  with 10Mb-Limit = 20 files a 10 Mb. But in all this cases, i cannot set or change the server settings for upload_max_filesize with this setting in OFA - the base is my server setting



to the code from dbs:
this two lines read's the setting (from the php.ini on this server) and set this value automatically to the OFA-Setting, that means: in my case, it set OFA to 200 mb, because, i've a default value in php.ini with 200 Mb for upload_max_filesize
this code cannot change the upload_max_filesize, it read's only the setting and use it in OFA - old version was a hard-coded value like

--- Code: ---$max_file_size           = 2;
--- End code ---
but then, i've to change it on every new server or after every server upgrade

check at first the php.ini, maybe with phpinfo() and search there for max_uploaded_filesi ze (size of a single file in the upload) and also the value of post_max_size (the summary of all content in a form, text and files). is there a small limit (like 2Mb), it is possible to change this in your .htaccess or in a php.ini / users.ini in the root folder of your wb-installation. Remember: post_max_filesize must be equal or higher than upload_max_filesize

P.S.: maybe somewhere in the upload-script (PLUpload), you found a code like this


--- Code: ---ini_set('upload_max_filesize','30M');
ini_set('post_max_size','30M');
--- End code ---

but it works not in every case. the most servers give's only the permission, to change the settings via .htaccess or users.ini, not via script

if you need it, trya code like this in your .htaccess (means 30 Mb)


--- Code: ---php_value post_max_size 30M
php_value upload_max_filesize 30M
--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version