Skip Navigation

[Resolved] Uploading large file size results in an error from the CRED AJAX upload

This support ticket is created 5 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 13 replies, has 4 voices.

Last updated by Waqar 5 years, 9 months ago.

Assisted by: Waqar.

Author
Posts
#1221262
File upload error 2.jpg
File upload error 1.jpg

Hello,
I am trying to: Upload a video over 70MB using a cred form with a custom field. I am using the Directory website reference site. I created a PHP.ini file containing the following values which I have confirmed are active
upload_max_filesize = 400M
memory_limit = 512M
post_max_size = 1000m
max_execution = 900000
max_input_time = 90000

Link to a page where the issue can be seen: hidden link

I expected to see: The file would upload (files below 50MB upload all ok)

Instead, I got: An error returned in the browser console. In the Chrome developer console I can see a link to the error hidden link which then contains the text "{"success":false,"message":"The file you uploaded it too large. You can upload files up to "}"
I can see the message seems to come from the "file_ajax_upload_manager.php" file under public_html/wp-content/plugins/cred-frontend-editor/application/controllers/frontend/ but I can't find any file size value that is causing it to trigger.
Cheers
Tom

#1221403

That error message is shown only for users who cannot see the native WordPress upload failure and uses the same mechanisms.
Hence, Files of 70 MB also cannot be uploaded thru your backend, without using Forms, I suspect.

Editing the PHP or htaccess often will not be enough as it depends entirely on the server, what file sizes you can or cannot upload.

Can you upload that same file in the Media uploader of WordPress?

#1221848

Hi Beda,

Thank you for getting back to me. I can upload the file (70MB) on the back end via media uploader all ok.
It seems the restriction is specific to the AJAX file upload on the front end.

Cheers
Tom

#1222380

Hi Tom,

Thank you for confirming that.

I performed some tests on my website with 75 MB file and AJAX-enabled frontend form but couldn't reproduce this issue.
( max upload file size: 80M & post_max_size = 120M )

This suggests that the issue is specific to your website and/or the server, as the Toolset plugins don't seem to add any file upload size restrictions, on their own.

To troubleshoot this further, I'll recommend checking the server's error log for any relevant errors/warnings.

If you haven't already, it would also be a good idea to test this with all non-Toolset plugins disabled and a default theme like Twenty Nineteen.

I hope these points will help and let me know how it goes.

regards,
Waqar

#1222810

Thank you for the update. I have tried disabling all other plugins and also used the Twenty Nineteen theme but get the same issue. I have looked in the server logs but there are no errors or warnings that I can see.
Are you able to load the "Directory website" Toolset reference site onto your site and see if that introduces the issue?

Kind Regards

Tom

#1223799

Hi Tom,

Thanks for writing back.

I repeated the tests with the "Classic cars for sale – directory site" reference site ( ref: https://discover-wp.com/site-types/directory/ ) and couldn't reproduce the issue with that either.

Can you please try the same website's clone on a different server/host or get in touch with the current server's support team for more detailed insights into server's error log, file upload restrictions, and permissions?

If you find anything from Toolset plugins is causing this, you're welcome to share it with us.

regards,
Waqar

#1224758

Hi,

Thanks for testing that on the directory site. I did speak to my host but they could not see anything wrong. They said for you to take a look at the PHP info here hidden link to see if you can see anything that you think might casue the issue?

Kind Regards

Tom

#1224858

Hi Tom,

I couldn't see anything out-of-place in the PHP info.

Would it be possible for you to share a snapshot/clone of your website, just to confirm whether the issue is server related or not?

I'm setting your next reply as private and you'll find details on how to share the duplicator package at:
https://toolset.com/faq/provide-supporters-copy-site/

regards,
Waqar

#1226393

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2019-04-05 at 15.11.31.png

Hi Tom

Waqar is off today.

I installed your duplicate.

At first attempt, backend or frontend, I was limited to 32Mb, so I went and edited my .htaccess file and added the following:

# END WordPress 
php_value upload_max_filesize 2048M
php_value post_max_size 2048M

I then tried again and had no problems uploading a large video (e.g. 90+Mb) on either the backend or the frontend (screenshot).

I don't know if it is just something that went wrong sharing the details in your original question, but your post_max_size = 1000m should use a capital M, I think, i.e. post_max_size = 1000M

#1226956

{ ticket status updated }

#1228776

Hello,

I have been working on this with my host and no solution so far. In regards to the post max size on my original question that has now changed and the value is being taken from php.ini.
I have seen a 140mb video file being uploaded by my host successfully but the very same file I get the error. All I can think of is that their internet speed is faster than mine so by the time my file uploads it is triggering some kind of time out, is that possible?
I can also see these errors in my wordpress error log

[10-Apr-2019 15:00:45 UTC] PHP Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in /var/sites/v/vehiclevideotrader.co.uk/public_html/wp-content/plugins/cred-frontend-editor/application/controllers/frontend/file_ajax_upload_manager.php on line 60
[10-Apr-2019 15:00:46 UTC] PHP Notice: Undefined property: CRED_Frontend_File_Ajax_Upload_Manager::$human_readable_max_upload_size in /var/sites/v/vehiclevideotrader.co.uk/public_html/wp-content/plugins/cred-frontend-editor/application/controllers/frontend/file_ajax_upload_manager.php on line 245

#1229274

Hi Tom,

If a timeout due to slow uploading speed occurs or the upload process is interrupted, both would explain the errors that you've shared.

Can you please check with your host to see if it is possible to further increase the values of "max_input_time" and "max_execution_time" in the PHP settings?

This will make sure that timeout issues are not faced, in case of large file uploads or slow internet speeds.

regards,
Waqar

#1230177

Hi,

Those times are currently set to 12000 and 6000 (6000 being 100 minutes) which should be more than enough and the max I believe my host allows. Most of the file uploads and then it fails, this is after about 9 minutes.

Is it possiable for you to try and upload with a 150mb video file over a slower conection. I'm currently using 4g which is about 13 mbps down and 2 up to see if you can see the error.

Kind Regards

Tom

#1231531

Hi Tom,

As you suggested, I repeated the form field upload test with an even larger file (200 MB) and it completed successfully.

An important point to note here is that Toolset plugins don't come with any restriction or limitation in terms of file's size or type.

But a successful file uploading will always be dependant on other factors like server's configuration, file permissions, visitor's connection speed/reliability, etc. All these parameters are, unfortunately, not under the control of our plugins.

Due to the complexity involved in the uploading of the large files, most websites which need them from visitors, suggest to upload them first on a dedicated video hosting platforms like YouTube, Vimeo, etc and then share only the link to the uploaded video.

This approach will not only improve the user experience as the server of these platforms are optimized for the video content delivery and offer better cross-device compatibility, but it will also save valuable space on your own server.

regards,
Waqar