| Server IP : 198.71.59.75 / Your IP : 216.73.216.240 Web Server : nginx/1.30.2 System : Linux elegant-dhawan.198-71-59-75.plesk.page 5.15.0-105-generic #115-Ubuntu SMP Mon Apr 15 09:52:04 UTC 2024 x86_64 User : realtyna_guys ( 10000) PHP Version : 8.2.31 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/plesk-9.0/ |
Upload File : |
#!/bin/bash
set -e
max=1440
update_max_lifetime()
{
local php_bin="$1"
local php_ini_path="$2"
local php_ini_scan_dir="$3"
[ -e "$php_bin" ] || return 0
[ -e "$php_ini_path" ] || return 0
local cur=$(env "PHP_INI_SCAN_DIR=$php_ini_scan_dir" "$php_bin" -c "$php_ini_path" -r 'error_reporting(0); echo ini_get("session.gc_maxlifetime");' 2>/dev/null)
[ ! "${cur:-0}" -gt "$max" ] || max="$cur"
}
if [ -d "/etc/php/8.1" ] ; then
for d in `find "/etc/php/8.1" -mindepth 1 -maxdepth 1 -type d`; do
update_max_lifetime "/usr/bin/php" "$d/php.ini" "$d/conf.d"
done
fi
# check Plesk php as well
if [ -d /opt/plesk/php ] ; then
for d in `find /opt/plesk/php/ -mindepth 1 -maxdepth 1 -type d`; do
update_max_lifetime "$d/bin/php" "$d/etc/php.ini" "$d/etc/php.d"
done
fi
echo $(($max/60))