I have a website hosted on a PC I have no access to. I have an upload form allowing people to upload mp3 files up to 30MB big. My server side script is done in PHP.
Every time I try and upload a file, I receive an error claiming that the file exceeds the maximum size allowed, so I need to increase the size. My research on the web suggested changing the .htaccess file which I do not have access to, so that won’t work. Others suggested that I should add a custom php.ini file to my root which did not work. Any other suggestions?
You need to set the value of
upload_max_filesizeandpost_max_sizein yourphp.ini:After modifying
php.inifile(s), you need to restart your HTTP server to use the new configuration.If you can’t change your
php.ini, you’re out of luck. You cannot change these values at run-time; uploads of file larger than the value specified inphp.iniwill have failed by the time execution reaches your call toini_set.See the Description of core
php.inidirectives.