• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Confused over php.ini

GuiltySpark

New Pleskian
Hi, I'm a little confused over which version of php.ini I'm meant to be or are actually using, so hoping someone could help?

I'm running Plesk Obsidian 18.0.24 on CentOS Linux 7.7.1908 (core)
Installed on the server is PHP versions (7.3.15, 7.1.33, 7.0.33, 5.6.40, 5.4.16) - although I'm not sure why when really I want to stick with the latest version.

In Plesk > Websites & Domains > PHP Settings are set to 7.3.15

However the command line tells me 5.4.16

When I run any server PHP scripts I have been using /opt/plesk/php/7.0/bin/php to point to the correct version and this works fine.

However I recently upgraded my development environment to use 7.3

So when I now use /opt/plesk/php/7.3/bin/php the scripts fail because they cannot find a file which is in a custom include_path.
Yet this custom path is in plesk (as an additional configuration directive) and in /etc/php.ini?

I'm confused..
 
Hi, I'm a little confused over which version of php.ini I'm meant to be or are actually using, so hoping someone could help?

I'm running Plesk Obsidian 18.0.24 on CentOS Linux 7.7.1908 (core)
Installed on the server is PHP versions (7.3.15, 7.1.33, 7.0.33, 5.6.40, 5.4.16) - although I'm not sure why when really I want to stick with the latest version.

In Plesk > Websites & Domains > PHP Settings are set to 7.3.15

However the command line tells me 5.4.16

When I run any server PHP scripts I have been using /opt/plesk/php/7.0/bin/php to point to the correct version and this works fine.

However I recently upgraded my development environment to use 7.3

So when I now use /opt/plesk/php/7.3/bin/php the scripts fail because they cannot find a file which is in a custom include_path.
Yet this custom path is in plesk (as an additional configuration directive) and in /etc/php.ini?

I'm confused..
Php 5.4.16 is the default php version of your server OS

php.ini of each plesk version is in :


ls -l /opt/plesk/php/*/etc/php.ini
-rw-r--r-- 1 root root 48984 feb 2 2018 /opt/plesk/php/5.2/etc/php.ini
-rw-r--r-- 1 root root 69789 jun 8 2018 /opt/plesk/php/5.3/etc/php.ini
-rw-r--r-- 1 root root 65621 jun 8 2018 /opt/plesk/php/5.4/etc/php.ini
-rw-r--r-- 1 root root 69428 jun 8 2018 /opt/plesk/php/5.5/etc/php.ini
-rw-r--r-- 1 root root 73847 jun 8 2018 /opt/plesk/php/5.6/etc/php.ini
-rw-r--r-- 1 root root 70802 jun 8 2018 /opt/plesk/php/7.0/etc/php.ini
-rw-r--r-- 1 root root 71258 jun 8 2018 /opt/plesk/php/7.1/etc/php.ini
-rw-r--r-- 1 root root 70828 jun 8 2018 /opt/plesk/php/7.2/etc/php.ini
-rw-r--r-- 1 root root 70917 dic 18 2018 /opt/plesk/php/7.3/etc/php.ini
-rw-r--r-- 1 root root 70917 dic 3 11:24 /opt/plesk/php/7.4/etc/php.ini
 
Installed on the server is PHP versions (7.3.15, 7.1.33, 7.0.33, 5.6.40, 5.4.16) - although I'm not sure why when really I want to stick with the latest version.
If not used disable it or remove it, especialy the versions which are end of life..
https://www.php.net/supported-versions.phphttps://support.plesk.com/hc/en-us/articles/115002450334-How-to-disable-PHP-functions-globally-https://support.plesk.com/hc/en-us/...ove-additional-PHP-versions-provided-by-Plesk
 
Thanks @sebgonzes, it makes a little more sense, but I'm still confused in how Plesk uses the .ini?

Are the .ini locations you provided only for when you run something from the shell?
Are these not the same ones used by Plesk?
If I modify the ini from the shell does it reflect in Plesk?
 
php.ini of website are in /var/www/vhosts/system/domain.tld/etc/php.ini but an copy of /opt/plesk/php/domain choose version/etc/php.ini at beginning, then you can change value to custom them in each domain.

if in shell you use only "php" command => /etc/php.ini and version 5.4
if in shell you use /opt/plesk/php/7.0/bin/php command => /opt/plesk/php/7.0/etc/php.ini is used
 
Back
Top