Edit: /opt/alt/alt-php-config/alt-php-panel-configuration.pyc (7481B)
Ñò
ˆz]hc @ s d d k Z d d k Z d d k Z d d k Z d d k Z d d k Z d d k l Z y d d k i i
Z
Wn e j
o d d k Z
n Xd Z
d „ Z d „ Z d „ Z d „ Z d
„ Z d „ Z d „ Z e d
j o e i e e i d ƒ ƒ n d S( iÿÿÿÿN( t copy2t checkt installt uninstallc C s… | o
t i } n
t i } t i ƒ } | i | ƒ d } t i | d ƒ } | i | ƒ t i ƒ } | i | ƒ | i | ƒ | S( sÉ
Logging configuration function
:type verbose: bool
:param verbose: Enable additional debug output if True, display only errors
othervise
:return: configured logger object
s %(levelname)-8s: %(message)ss %H:%M:%S %d.%m.%y( t loggingt DEBUGt ERRORt
StreamHandlert setLevelt Formattert setFormattert getLoggert
addHandler( t verboset levelt handlert
log_formatt formattert logger( ( s6 /opt/alt/alt-php-config/alt-php-panel-configuration.pyt configure_logging s
c C sE g } x. t i d ƒ D] } | i | d | f ƒ q W| i ƒ | S( s¨
Returns list of installed alt-php versions and their base directories
:rtype: list
:return: List of version (e.g. 44, 55) and base directory tuples
s /opt/alt/php[0-9][0-9]iþÿÿÿ( t globt appendt sort( t php_versionst php_dir( ( s6 /opt/alt/alt-php-config/alt-php-panel-configuration.pyt find_alt_php_versions) s
c C sº t i d d g d t i d t i d t ƒ} | i ƒ \ } } x] | i d ƒ D]L } d | | f | i ƒ i d ƒ d j o t i d
| | f ƒ t SqO Wt i d | | f ƒ t
S( sx
:param php_ver: alt-php version (e.g. 44, 55, 70)
:return: If handler exist returns True, otherwise False
s /usr/local/psa/bin/php_handlers --listt stdoutt stderrt universal_newliness
s alt-php%s-%st i s Handler for alt-php%s-%s exist.s# Handler for alt-php%s-%s not exist.( t
subprocesst Popent PIPEt STDOUTt Truet communicatet splitt stripR t infot False( t cgi_typet php_vert proct outt _t line( ( s6 /opt/alt/alt-php-config/alt-php-panel-configuration.pyt plesk_check_php_handler7 s * c C sg t | | ƒ o t i d | | f ƒ t St i d | | f ƒ t i i d i | | ƒ ƒ d } | d d d | | f d t i i
| d ƒ d
t i i
| d ƒ d | d
d | | f g } | d j o‹ | i d d | d t i i
| d ƒ d t i i
| d ƒ g ƒ t i i d | ƒ p/ t
t i i
| d ƒ t i i
| d ƒ ƒ q{n# | i d t i i
| d ƒ g ƒ t i | d t i d t i d t ƒ} | i ƒ \ } } | i d j o# t d d i
| ƒ | f ƒ ‚ n t i | d g d t i d t i d t ƒ} | i ƒ \ } } | i d j o t d | d! | ƒ ‚ n t i d" | ƒ t S(# Ns Handler for alt-php%s-%s exist.s' Plesk: Installing alt-php%s-%s handler.s) Plesk: Installing alt-php{0}-{1} handler.s /usr/local/psa/bin/php_handlers --adds -displaynames alt-php%s-%ss -clipaths usr/bin/phps -phpinis etc/php.inis -types -idt fpms -services
alt-php%s-fpms -paths usr/sbin/php-fpms -poolds
etc/php-fpm.ds /opt/alt/php%s/etc/php-fpm.confs etc/php-fpm.conf.plesks etc/php-fpm.confs usr/bin/php-cgiR R R i u cannot execute "%s": %sR s --rereadu cannot execute "s --reread": %ss- Handler for alt-php%s was successfully added.( R. R R&