Submit
Path:
~
/
/
opt
/
cloudlinux
/
venv
/
lib64
/
python3.11
/
site-packages
/
clwizard
/
modules
/
__pycache__
/
File Content:
php.cpython-311.pyc
� ��f � � � d dl mZ d dlZd dlmZmZ d dlmZ d dlm Z d dl mZ d dlm Z mZ d dlmZmZ d d lmZ G d� de� � ZdS ) � )�absolute_importN)�Dict�List)�Feature)�ExternalProgramFailed)�check_cagefs_initialized)�CL_SELECTOR_BIN�MODULES_LOGS_DIR)�InstallationFailedException�PackageMissingError� )�WizardInstallerc �� � e Zd Zej � ed� � Zej Z d� Zd� Zd� Z d� Zed� � � Zed� � � Zed� � � Zd � Zd � Zd� Zd� Zd S )�PhpInstallerzphp.logc �� � | j � d|� � | � t dddd|dg� � d S # t $ r}t � � |�d }~ww xY w)Nz)trying to set default php version as '%s'�set� --interpreter�phpz--default-version�--json�� app_logger�info�_run_commandr r r )�self�version�es �K/opt/cloudlinux/venv/lib64/python3.11/site-packages/clwizard/modules/php.py�_set_default_php_versionz%PhpInstaller._set_default_php_version s� � �����H�'�R�R�R� 7����#��#��'���� � � � � �� %� 7� 7� 7�-�/�/�Q�6����� 7���� �!A � A� A�Ac �� � | j � d|� � | � t dddd|dg� � d S # t $ r}t � � |�d }~ww xY w)Nz%trying to set PHP Selector state '%s'r r r z--selector-statusr r )r �statusr s r �_set_cloudlinux_selector_statusz,PhpInstaller._set_cloudlinux_selector_status- s� � �����D�f�M�M�M� 7����#��#��'���� � � � � �� %� 7� 7� 7�-�/�/�Q�6����� 7���r c �$ � | j � dd� |� � � � g }|D ]0}d|� dd� � z }|� |� � �1 | j |� dS # t $ r}t � � |�d}~ww xY w)z� Install given php versions via groups :param versions: e.g ['4.4', '5.4', '5.6'] :return: None z)php version '%s' is going to be installed�,zalt-php�.� N)r r �join�replace�append�_install_groupsr r )r �versions�groups�ver�package_namer s r �_install_php_versionz!PhpInstaller._install_php_version? s� � � ����7����(�9K�9K� � � � ��� (� (�C�$�s�{�{�3��';�';�;�L��M�M�,�'�'�'�'� 7� !�D� �&�)�)�)�)��$� 7� 7� 7�-�/�/�Q�6����� 7���s �% A1 �1 B�;B � Bc �F � |� d� � }|� dg � � }|� d� � }|r/|r-||vr)| j � d|� � t � � �| � |� � t � � r�|r1| � d�� � |r| � |� � d S d S | � d�� � d S # t $ r3}| j � dt |� � � � Y d }~d S d }~ww xY wd S ) a� Run installation of php module It is possible to install only alt-php packages and skip further installation if 'enable_selector': False Otherwise we will configure php selector also -- set selector status to enabled -- set default version if it was passed :param options: {'versions': [5.5, 5.6], 'enable_selector': True} :return: �default_versionr+ �enable_selectorzWVersion %s that was specified to be set as default must be included in install_versions�enabled)r! �disabledz/Error occurred while disabling PHP Selector: %sN) �getr �errorr r/ r r"