HEX
Server: LiteSpeed
System: Linux 112.webhostingindonesia.co.id 5.14.0-570.62.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 10:10:59 EST 2025 x86_64
User: iyfwylsv (10313)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: //proc/thread-self/root/lib/phpenv/hooks/exec/php-ini.bash
# Hooks into 'phpenv exec' to augment command line with correct php.ini path.
# php.ini path is taken from respective .php-ini file (similar to .php-version).

# Path to .php-version file or ~/.phpenv/version
PHPENV_VERSION_FILE="$(phpenv-version-file)"
# Path to corresponding .php-ini file
PHPENV_INI_FILE="$(dirname "$PHPENV_VERSION_FILE")/.php-ini"
# Path to the php.ini file (contents of the .php-ini file), typically /var/www/vhosts/system/$domain/etc/php.ini
PHPENV_INI="$(phpenv-version-file-read "$PHPENV_INI_FILE")" || :

if [ "$PHPENV_COMMAND" = "php" -a -f "$PHPENV_INI" ]; then
	# Check if php.ini should be added to the command line:
	# - add if not explicitly specified
	# - and do not add if composer or /usr/local/bin/wp is called
	HAS_PHP_INI_ARG=
	prev_arg=
	for arg; do
		case "$arg" in
			-c|--php-ini|-n|--no-php-ini)
				HAS_PHP_INI_ARG=yes
				break
				;;
			--) break ;;
			-*) : ;;
			*)
				# The argument could be a file path, check if it could end PHP arguments list
				case "$prev_arg" in
					-F|--process-file|-z|--zend-extension|-t|--docroot) : ;;
					# Previous argument is not empty, i.e. this is not the php binary path (which exists)
					?*)
						if [ -f "$arg" ]; then
							# Treat composer in a special way - don't use .php-ini with it (e.g. due to 'open_basedir')
							! [ "`basename "$arg"`" = "composer.phar" ] || HAS_PHP_INI_ARG=yes
							# Treat wp (wp-cli provided by WP Toolkit) in the same way, to avoid default 'open_basedir' restriction
							! [ "$arg" = "/usr/local/bin/wp" ] || HAS_PHP_INI_ARG=yes
							# Found a file argument to php command, which ends PHP arguments list
							break
						fi
						;;
				esac
				;;
		esac
		prev_arg="$arg"
	done
	unset prev_arg

	if [ -z "$HAS_PHP_INI_ARG" ]; then
		# Inject '-c php.ini' arguments before other PHP arguments
		set -- "$1" -c "$PHPENV_INI" "${@:2}"
	fi
fi