File Uploading issue on cpanel - php

I have deployed a laravel website on cPanel. I have a zip file of 19.1mb when ever i try to upload this file through form in my website got an error
There were some problems with your input.
The file_uploads.0 failed to upload.
I do not understand why this is happening. I have checked my cPanel setting of max file size upload it is 8M. I have updated max_execution_time to 5 minutes but nothing changed.
Please let me know if you have any solution for this
Thank you

Related

Can't Upload Image using WordPress Media Upload

I'm trying to upload an image to my WordPress site. The image is 5.6 MB big.
The resolution is 1920px x 1444px.
I've already uploaded a much smaller image (0.5MB / 939px x 471px). That worked fine.
I'm getting this error message: The server cannot process the image. This can happen if the server is busy or does not have enough resources to complete the task. Uploading a smaller image may help. Suggested maximum size is 2560 pixels.
WHAT I HAVE TRIED:
I have already tried a few things:
Changed the upload_max_filesize, post_max_size, max_execution_time in the php.ini File
(WordPress even says that the max size is 128M now)
Changed the 'big_image_size_threshold'
Uploaded the images to the Server via SFTP, renamed them according to the Other images that are in the Folder, but that didnt work as well
Installed a few plug-ins that change the max upload size. Didnt work either.
I've looked at so many websites, but they all gave me these as solutions.
Has anybody got any Idea? Thank you in advance.
WHAT I AM USING:
Operating System: Debian GNU/Linux 10 (buster)
PHP-Version: 8.0
WordPress Version: 6.1.1
Also I'm using Nginx not Apache2
Dean
1- try deactivating all other plugins temporarily , it may happen sometimes due to some plugin process the images before uploading to the server.
2- if you want to upload any file to the wordpress outside the wordpress dashboard make sure to use the plugin named " Add From Server " , for this case you first upload your file to the directory then u import them via this plugin to your wordpress database so it loads in the wordpress dashboard.
3- at last if you using any control panel to manage your server , check the php.ini setting in its control panel , sometimes setting in the server overwrite the local php.ini in your website directory.

Ajax Drupal detect uploaded image too large

I'm trying to solve a problem on a content (agenda) creation form which needs two images uploaded by the admin. The problem is when we create the content for the first time and try to upload the images, we got in the console a Drupal Ajax error which prevents the form to be correctly submitted.
The error:
When I visit the page that contains the debugging information it says that the uploaded file exceed the maximum file size allowed by the server (40 MB) although I uploaded a 100 KB image.
In the content type of my agenda, both my images fields have the 40 MB limit set up and same for my php.ini upload_max_filesize is set to 40 MB
I have confirmed that this error can be reproduced on different environments (Windows + Xampp and Linux + Nginx)
I ran out of ideas, so if everyone has any ideas on how to fix this, I would appreciate ^^.
In your Nginx server config try something like:
server {
client_max_body_size 40M;

Error when uploading files larger than 500MB on vps server

I have a vps server (on hostinger) running on openlitespeed (cyberpanel). The website that I built uses PHP.
I created a file upload service and set my php config's post max limit to 1024M and upload max filesize to 1024M as well since both those settings work on my local when testing for large file uploads under 1gb. (I've also restarted php, as well as my server to see if it solved the issue but it still persists. I've also created a phpinfo file to confirm if my post max limit and upload max filesize were changed to 1024M/1G and they were changed)
But on my webserver, uploading files larger than 500mb gives me a "POST net::ERR_HTTP2_PROTOCOL_ERROR" on my console pointing to a line on one of my javascript code referring to my xhttp.send (specifically xhttp.send(formData) XML Http Request. This XML http request forwards the selected file to an upload.php script that processes the data. But it's not getting sent to that script due to the error.
When I get that error when uploading files larger than 500mb, I'd also get an error in my server's error log:
[NOTICE] [xxxx] [T0] [xx.xxx.xx.xxx:xxxxx:HTTP2-3#APVH_*:443_website.com] Request body size: <filesize> is too big!
The uploader works fine when uploading files under 500mb, it sends the formdata to the php upload script and stores it in the server as well as the database. But it gives an error when uploading more than that.
I've looked everywhere to solve this issue, I've also looked into openlitespeed's max request body size since it's seems like it's what the error on my error log shows, but most of the answers I've seen were from several years ago and no longer applies and didn't resolve the issue.
There doesn't seem to be any issue with my php script as well as my javascript from my tests since it works with no issues on my local server, and works fine with small file sizes on my web server.
Is there anyway to resolve this issue?

PHP error when adding swf game file

I have an adult tube site setup using AVS.
I tried to add a game (swf file), but after uploading is complete, it shows an error "Please selected a game file!" even though I have selected one.
Any idea what might be happening here? THanks!
Solved!
The file was being rejected because the max file upload in php was set to just 2M.
I changed it's value in my php config and now file uploads work great!

500 Internal Server Error When Uploading Images Using PHP

I'm offering users the ability to upload files using an online form, but I keep on getting 500 internal server errors whenever the file upload is processed. This is what I know:
The problem isn't related to php.ini. I've checked the max file upload size, and it's set at 2 megabytes. I get the same 500 internal server error uploading 3kb large files, as well as 100kb large files.
The problem isn't related to file permissions. The php file I'm using to upload, upload.php, has permissions set to 664, and the upload folder, called upload_pic, has folder permissions of 755.
This is not an issue with the code. The exact same code was working on my previous server. I recently bought a new server and am migrating the sites over, and this is where I'm getting my problem.
I've looked online for the past two days, but I just can't find what's causing the problem. I've seen many issues similar to mine, but most of these were resolved by changing file/directory permissions, or making edits to php.ini.
Does anyone have any other proposed solutions?
Thanks!

Categories