I have problems with the upload videos bigger than 200-300MB. Most likely this is being caused by the post_max_size setting. It's currently set to 8G, I cheched both "Resource Limits" and "Edit Configuration Manually", but the phpinfo file insists that the value was 0, which I suppose means that there is no limit, but larger videos won't upload.
Status:
Closed (works as designed)
Comments
Submitted by JamieCameron on Fri, 11/17/2017 - 21:15 Comment #2
What error do you get when uploading exactly?
It just times out. I suspect the problem might be related to the fact that no matter what I enter as the 'post_max_size' value, the phpinfo() will return that the value was 0.
Submitted by JamieCameron on Sat, 11/18/2017 - 10:42 Comment #4
Which file are you editing this in?
The edited file is /etc/php/7.0/cgi/php.ini using both "Resources Limit" and "Edit Configuration Manually" in "Manage PHP Configuration". At this stage, php v7.0 is the only php version installed. I wanted to get php v7.0 to work first, before I add more complexity. I set post_max_size to both 8G and 8192M, but neither of the two worked.
It seems there is somewhere another setting that overwrites this setting with 0, i.e. unlimited, but unlimited does not seem to work. I have used the same Videogallery Wordpress plugin on another server and there 8192M worked fine.
Submitted by JamieCameron on Sun, 11/19/2017 - 11:18 Comment #6
You should instead edit the
etc/php.ini
file under the domain's home directory.Thanks for that. It works!!! Post_max_size does no longer insists to be 0 and "max_execution_time" no longer remains stubbornly on 40, irrespective of what I set in the global php settings.
However, none of this makes any sense to me and seems to me like a bug, not sure if Ubuntu or Virtual Pro. Why is that most settings can be set globally and others must be set on a per domain basis?! I only run five types of sites on my domains: 1. WordPress 2. Joomla 3. MediaWiki 4. Moodle 5. Mahara 6. Dspace Most sites are multilingual, using language specific subdomains. It would make my life so much easier, if I could use the same global php settings for all sites, and set only those few settings on a per domain or subdomain basis that should be limited to a platform specific, such as timeouts and post or file upload sizes.
I need to know which settings cannot be global and must be set individually because they are being ignored by individual domains.
By the way, if would make the task of settings individual php.ini files easier and less frustrating if there was a clickable list of domain names. I'm thinking of a table, similarly to your virtual server list, with the installed php versions (global, 5.6, 7.0, 7.1 etc) on the x-axis and installed domains and subdomains on the y-axis.
Submitted by JamieCameron on Mon, 11/20/2017 - 04:38 Comment #8
The way Virtualmin works, each domain has it's own php.ini file (or rather, one per PHP version) that is copied from the global config under /etc when the domain is created, and modified to match the domain. It would be ideal if PHP allowed multiple layers of config files so you could make global changes, but unfortunately that isn't possible.
In that case, I would like to make the following suggestion. When users make any changes to the global php.ini, especially those made in "resource limits", make virtualmin replicate those changes to all php.ini files, i.e. for all domains and subdomains.
Submitted by JamieCameron on Mon, 11/20/2017 - 07:28 Comment #10
That's tricky, as we can't detect changes made when the file is edited directly.
However, there is another option - you can use the Virtualmin command-line API to perform a mass update for all domains, with a command like :
virtualmin modify-php-ini --all-domains --ini-name something --ini-value somevalue