PHP file won't upload


I am using and when I tried to upload video files, they didn't upload, without showing any errors, I guess this is caused by php.ini file. So I went to cPanel and went to PHP Config, and copied the file but it renamed to php.ini.default, and when I make changes to that file it doesn't seem to be working. So my concern is, change maximum file upload size from php.ini and do I need to rename php.ini.default to php.ini




The php.ini file should be named php.ini to be read. Anyway some servers will block your changes to that file, to check if the change is in effect you can use the function ini_get to see what is your setting value.

echo 'upload_max_filesize =' . ini_get('upload_max_filesize') . PHP_EOL;

Also you should check the post_max_size in your php.ini file, files are transfered using POST.

echo 'post_max_size = ' . ini_get('post_max_size') . PHP_EOL;

People are also looking for solutions to the problem: php - foreach echo into 2 different input from json


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.