Where php.ini is located

Post Reply
User avatar
myVesta
Site Admin
Posts: 712
Joined: Fri Jun 19, 2020 9:59 am
Where php.ini is located

Post by myVesta »

Location of php.ini is /etc/php/7.x/fpm/php.ini
(where 7.x is 7.3 for example)

After you make the changes, you should restart php-fpm (do it in SSH, as root):

Code: Select all

sudo systemctl restart php7.x-fpm
(where 7.x is 7.3 for example)

Please note:
  • memory_limit
  • max_execution_time (also consider: request_terminate_timeout)
  • upload_max_filesize
  • post_max_size
  • open_basedir
  • upload_tmp_dir
  • sendmail_path
  • mysql.allow_persistent
  • safe_mode
... are overrided in /etc/php/7.x/fpm/pool.d/your-domain.com.conf files.
These variables you should change there.
Also restart php-fpm after those changes.

If you need different default values for newly created domains, edit /usr/local/vesta/data/templates/web/apache2/PHP-FPM-7x.sh files.

Tags:

1webdomain
Posts: 7
Joined: Tue Sep 29, 2020 6:57 am
Re: Where php.ini is located

Post by 1webdomain »

THX

crafter
Posts: 18
Joined: Wed Nov 10, 2021 11:43 pm
Re: Where php.ini is located

Post by crafter »

I just did a fresh install of myvesta and try to edit the php file but my php.ini file is blank. I input the desired values in basic form but it keeps erasing and I paid for the file manger addon and got it up but I still can't get to edit the /etc/php/7.3/fpm/php.ini file like you stated in this post. what am i missing please?

User avatar
myVesta
Site Admin
Posts: 712
Joined: Fri Jun 19, 2020 9:59 am
Re: Where php.ini is located

Post by myVesta »

crafter wrote:
Mon Nov 15, 2021 10:46 am
I just did a fresh install of myvesta and try to edit the php file but my php.ini file is blank. I input the desired values in basic form but it keeps erasing and I paid for the file manger addon and got it up but I still can't get to edit the /etc/php/7.3/fpm/php.ini file like you stated in this post. what am i missing please?
FileManager can't reach /etc/php/7.3/fpm/php.ini

Please screenshot your SSH console while you are trying to edit /etc/php/7.3/fpm/php.ini
Also, please mention what Debian version you are using?

crafter
Posts: 18
Joined: Wed Nov 10, 2021 11:43 pm
Re: Where php.ini is located

Post by crafter »

I'm using Debian 10. i use Putty to access ssh as root. I'm a novice so i just copy and paste the command line you put up here and follow instructions. so i input: /etc/php/7.3/fpm/php.ini and got "-Bash: /etc/php/7.3/fpm/php.ini: Permission denied.

The problem is i want to change the Post max, max input, memory limit etc of the php 7.3 but it wasn't saving and the advance editing option only shows: "Usage: CONFIG" and nothing else but I'm familiar with editing php.ini file so i know there should be more.

Furthermore, the vesta-php configuration link takes me to a page that shows: "Page not Found"

User avatar
myVesta
Site Admin
Posts: 712
Joined: Fri Jun 19, 2020 9:59 am
Re: Where php.ini is located

Post by myVesta »

crafter wrote:
Mon Nov 15, 2021 11:15 am
I'm using Debian 10. i use Putty to access ssh as root. I'm a novice so i just copy and paste the command line you put up here and follow instructions. so i input: /etc/php/7.3/fpm/php.ini and got "-Bash: /etc/php/7.3/fpm/php.ini: Permission denied.
In SSH type:

Code: Select all

sudo mcedit /etc/php/7.3/fpm/pool.d/your-domain.com.conf
Save with F2 keyboard key.
Exit with ESC keyboard key.

Then restart php7.3:

Code: Select all

sudo systemctl restart php7.3-fpm
Also, you cen edit php.ini by typing:

Code: Select all

sudo mcedit /etc/php/7.3/fpm/php.ini
but almost all changes you need to do in /etc/php/7.3/fpm/pool.d/YOUR-DOMAIN.COM.conf

crafter
Posts: 18
Joined: Wed Nov 10, 2021 11:43 pm
Re: Where php.ini is located

Post by crafter »

These steps worked like magic :shock: . Thank you very much and especially for how fast you responded. More codes to your brain :ugeek:


Post Reply