• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 Error Uploading File After Moving to New VPS

Hi :)
I am facing this error when uploading files,

The following error occurred
There was a problem uploading your file.

I am hosting my forum on a VPS,

searched through the forum, every one mentioned about mod_security?
but cant get the steps to fix on a VPS,

can i fix this from my VPS?,
between i am using Cpanel WHM.

i have tried disabling flash uploader, its not working for larger files,

i set max_execution_time is 1800 ,

is this related to max_input_time too?

small files are uploaded but large files are throwing this error,

I have set 64MB as post max size,
files are within 60MB only.

someone give me hint :)

Jake Bunce

XenForo moderator
Staff member
Since it happens on large files there must be a limit somewhere.

Here are some server settings which might be limiting:

PHP (can be viewed at admin.php?tools/phpinfo):


Incidentally, does it only happen for images or all files? If it's only images then the graphics library might be in play:

Admin CP -> Home -> Options -> Attachments -> Default Image Processor
Hi Jake,
Thank you for response ,
partially i cleared this issue by increasing max_upload_size to 128MB,

still i am getting that error for some files,
Trying mp4 files,
checked with 4 or 5 files,
3 of them uploaded but 2 of them giving error..!!
is there any ways to debug the error??
Please try disabling the Flash uploader in your options to see if it still happens.
When i disable the flash uploader, i got the error,

"The following error occurred
The server responded with an error. The error message is in the JavaScript console.

When i checked with console,
got these following details :(

"PHP <div class="baseHtml"><h4>Template Errors: attachment_upload_overlay</h4><ol>
<li><i>number_format() expects parameter 1 to be double, string given</i> in /home/user/public_html/forum/library/XenForo/Locale.php, line 720</li>
<li><i>number_format() expects parameter 1 to be double, string given</i> in /home/user/public_html/forum/library/XenForo/Locale.php, line 720</li>

{"templateHtml":"\n\n\n\n\n<form action=\"http:\/\/tamilsurabi.com\/forum\/attachments\/do-upload\" method=\"post\"\n\tenctype=\"multipart\/form-data\"\n\tclass=\"formOverlay AutoInlineUploader AttachmentUploadForm NoAutoHeader\"\n\tdata-overlayClass=\"attachmentUploader\">\n\t\n\t<dl class=\"ctrlUnit\">\n\t\t<dt><label for=\"ctrl_upload\">Upload a File (<span title=\"131,096,576 bytes\">Max 125 MB<\/span>):<\/label><\/dt>\n\t\t<dd id=\"SWFUploadContainer\" data-placeholder=\"#SWFUploadPlaceHolder\" data-trigger=\"#ctrl_upload\">\n\t\t\t<span id=\"SWFUploadPlaceHolder\"><\/span>\n\t\t\t<input type=\"file\" name=\"upload\" class=\"textCtrl\" onchange=\"this.blur()\" id=\"ctrl_upload\" \/>\n\t\t\t<input type=\"reset\" value=\"Close\" class=\"OverlayCloser button smallButton\" \/>\n\t\t<\/dd>\n\t<\/dl>\n\t\n\t<div class=\"attachmentConstraints pairsRows\">\n\t\t<dl><dt>Accepted file types:<\/dt> <dd>mp4, avi, mkv, zip, txt, pdf, png, jpg, jpeg, jpe, gif, epub, mp3, rar<\/dd><\/dl>\n\t\t\n\t\t\t<dl><dt>Max image width:<\/dt> <dd> pixels<\/dd><\/dl>\n\t\t\n\t\t\n\t\t\t<dl><dt>Max image height:<\/dt> <dd> pixels<\/dd><\/dl>\n\t\t\n\t<\/div>\n\n\t<input type=\"hidden\" name=\"_xfToken\" value=\"1,1426006529,1dceb1afa0f3dac04d8fcff47ae7a689b4bcdac4\" \/>\n\t<input type=\"hidden\" name=\"hash\" value=\"ae67d23e9597b2e3f84ad7d2c1547d42\" \/>\n\t<input type=\"hidden\" name=\"content_type\" value=\"post\" \/>\t\t\t\n\t<input type=\"hidden\" name=\"key\" value=\"\" \/>\n\t<input type=\"hidden\" name=\"content_data[thread_id]\" value=\"546\" \/>\n\t\n\t\n<\/form>","css":{"stylesheets":["attachment_editor"],"urlTemplate":"css.php?css=__sentinel__&style=1&dir=LTR&d=1426005606"},"js":["js\/xenforo\/attachment_editor.js?_v=7b21f29a"],"title":"File Uploader","_visitor_conversationsUnread":"1","_visitor_alertsUnread":"4"}" xenforo.js:230:168

XenForo.activate(%o) [object Object]


XenForo developer
Staff member
That PHP error is a little weird and one I'll have to see if I can reproduce. It appears to be related to your max image dimensions; it seems they're set to weird values rather than blank or 0?

You likely also want to disable debug mode.