We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on Vesta 2.0 and expect to release it by the end of 2024. Read more about it: https://vestacp.com/docs/vesta-2-development
How To Change Local Settings ? Topic is solved
How To Change Local Settings ?
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 :)
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 ?
Hi,
What operating system on your server ?
don't change this file, this file for vestacpi tried editing the
/usr/local/vesta/php/lib/php.ini
What operating system on your server ?
Re: How To Change Local Settings ?
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:
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).
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>
-
- Posts: 6
- Joined: Sat Sep 17, 2016 1:55 pm
Re: How To Change Local Settings ?
@alanms Thank you so much. This saved me an headache of about 4 days already.
Re: How To Change Local Settings ?
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.
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
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: How To Change Local Settings ?
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 ?
I guess you misunderstood me.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 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
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: How To Change Local Settings ?
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
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 ?
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 ?
@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