I am using bluehost.com 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
1 Answer
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;
2 Comments
dimo414
Why the
PHP_EOL constants? You only need to be concerned with the server platform if working with local files - you can use \n or <br /> to trigger line breaks in the HTML output.dvicino
I'm just use them for portability, i'm not always in an unix enviroment, but you can avoid the use of them. They just put an enter whatever your platform it is runnning on.