Page 1 of 2
How To Change Local Settings ?
Posted: Sat Jun 07, 2014 11:56 am
by msk19994
Hey Guys
I am trying to upload a file more than 2MB but it wont upload, I have selected the default package with the default apache template, i have edited the /etc/php.ini and inserted the details regarding max file size etc but it wont seem to work ie
example
http://fool.pk/phpinfo.php
You can see Master and Local . Where to edit that stupid local 2M i tried editing the
/usr/local/vesta/php/lib/php.ini
thinking it might be the local one but even after the service httpd restart it doesnt seem to change the 2M
It would be great if someone could help me out here
Thanks :)
Re: How To Change Local Settings ?
Posted: Thu Jun 26, 2014 6:49 pm
by imperio
Hi,
i tried editing the
/usr/local/vesta/php/lib/php.ini
don't change this file, this file for vestacp
What operating system on your server ?
Re: How To Change Local Settings ?
Posted: Mon Mar 14, 2016 6:16 pm
by alanms
I don't know why the Vesta team can't just answer a simple question.
The "Local" settings are coming from Vesta's web profile templates. It's a "feature" that gives you settings you didn't ask for without telling you it's doing so. More info here
viewtopic.php?t=4328
When you set up a new site in the "web" tab, you were given an unexplained dropdown menu with options like "default", "basedir", "hosting", "phpcgi" and "phpfcgid".
Each one of these corresponds to a secret settings override .tpl file hidden in /usr/local/vesta/data/templates/web/httpd
These override your php.ini settings with "local" settings, leaving no clue as to where the local settings came from. For example, if you chose "hosting", it forces this into your local Apache settings:
Code: Select all
<Directory %docroot%>
AllowOverride All
Options +Includes -Indexes +ExecCGI
php_admin_value upload_tmp_dir %home%/%user%/tmp
php_admin_value upload_max_filesize 10M
php_admin_value max_execution_time 20
php_admin_value post_max_size 8M
php_admin_value memory_limit 32M
php_admin_flag mysql.allow_persistent off
php_admin_flag safe_mode off
php_admin_value session.save_path %home%/%user%/tmp
php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'
</Directory>
If you just want to use global settings, "Default" is the option to chose. It doesn't change any PHP settings (but it does change some other Apache settings).
Re: How To Change Local Settings ?
Posted: Mon Aug 21, 2017 5:48 am
by obouncetech
@alanms Thank you so much. This saved me an headache of about 4 days already.
Re: How To Change Local Settings ?
Posted: Thu Feb 01, 2018 7:59 am
by xguntis
Editing config files in /usr/local/vesta/data/templates/web/apache2 changes the master value, but how to change local value, which differs from master?
EDIT: added following lines to .htaccess of the website i am testing, but it did not help.
Code: Select all
php_value upload_max_filesize 64M
php_value post_max_size 64M

Re: How To Change Local Settings ?
Posted: Thu Feb 01, 2018 5:53 pm
by mehargags
Just edit your corresponding /etc/php ini file to make changes global irrespective of the template used if you need it serverwide.
Re: How To Change Local Settings ?
Posted: Fri Feb 02, 2018 8:18 am
by xguntis
mehargags wrote:Just edit your corresponding /etc/php ini file to make changes gloabal irrespective of the template used if you need it serverwide.
I guess you misunderstood me.
I am using the hosting template where there is /usr/local/vesta/data/templates/web/apache2/hosting.tpl file that is responsible for configuring global values like this:
Code: Select all
php_admin_value upload_max_filesize 64M
php_admin_value post_max_size 64M
And the global values are 64M as you can see in the screenshot in my previous post. I am looking where to increase the local values.
Re: How To Change Local Settings ?
Posted: Fri Feb 02, 2018 10:23 am
by mehargags
I still don't understand your question... Local values for what ?
You want to restrict values through tpl files ? You can setup the Apache directives in the the specific tpl/stpl files
or
you can use .htaccess
Re: How To Change Local Settings ?
Posted: Fri Feb 02, 2018 12:59 pm
by xguntis
On the attached screenshot (this is from phpinfo();) you see the left column for post_max_size is 8M (local value) and on the right column 64M (master value). I want the local value to be 64M. As I wrote above .htaccess did not help.

Re: How To Change Local Settings ?
Posted: Fri Feb 02, 2018 1:45 pm
by noogen
@xguntis it is as you've describe. You either change it in the hosting.tpl and hosting.stpl or don't use the hosting template. Use another template that does not have the setting of php_admin_value post_max_size 8M