/opt/alt/alt-php-config
NameSizeModeActions
__pycache__/-0755rm
alt-php-panel-configuration.py77260755editdlrm
alt-php-panel-configuration.pyc74810644editdlrm
alt-php-panel-configuration.pyo74810644editdlrm
alt-php.cfg2760755editdlrm
detectcp.py6900755editdlrm
detectcp.pyc7510644editdlrm
detectcp.pyo7510644editdlrm
install_odbc5260755editdlrm
multiphp_reconfigure.py78830755editdlrm
multiphp_reconfigure.pyc83500644editdlrm
multiphp_reconfigure.pyo83500644editdlrm
Edit: /opt/alt/alt-php-config/alt-php-panel-configuration.pyo (7481B)
Ñò ˆz]hc@sddkZddkZddkZddkZddkZddkZddklZyddki i Z Wne j oddk Z nXdZ d„Zd„Zd„Zd „Zd „Zd „Zd „Zed joeieeidƒƒndS(iÿÿÿÿN(tcopy2tchecktinstallt uninstallcCs…|o ti}n ti}tiƒ}|i|ƒd}ti|dƒ}|i|ƒtiƒ}|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( tloggingtDEBUGtERRORt StreamHandlertsetLevelt Formattert setFormattert getLoggert addHandler(tverbosetlevelthandlert log_formatt formattertlogger((s6/opt/alt/alt-php-config/alt-php-panel-configuration.pytconfigure_loggings         cCsEg}x.tidƒD]}|i|d|fƒqW|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þÿÿÿ(tglobtappendtsort(t php_versionstphp_dir((s6/opt/alt/alt-php-config/alt-php-panel-configuration.pytfind_alt_php_versions)s  cCsºtiddgdtidtidtƒ}|iƒ\}}x]|idƒD]L}d||f|iƒidƒd joti d ||fƒtSqOWti 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--listtstdouttstderrtuniversal_newliness s alt-php%s-%st isHandler for alt-php%s-%s exist.s#Handler for alt-php%s-%s not exist.( t subprocesstPopentPIPEtSTDOUTtTruet communicatetsplittstripRtinfotFalse(tcgi_typetphp_vertproctoutt_tline((s6/opt/alt/alt-php-config/alt-php-panel-configuration.pytplesk_check_php_handler7s * cCsgt||ƒotid||fƒtStid||fƒtiidi||ƒƒd}|ddd||fdti i |d ƒd ti i |d ƒd |d d||fg }|djo‹|i dd|dti i |dƒdti i |dƒgƒti i d|ƒp/t ti i |dƒti i |dƒƒq{n#|i dti i |dƒgƒti|dtidtidtƒ}|iƒ\}}|idjo#tddi |ƒ|fƒ‚nti|dgdtidtidtƒ}|iƒ\}}|idjotd |d!|ƒ‚ntid"|ƒtS(#NsHandler 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-idtfpms-services alt-php%s-fpms-pathsusr/sbin/php-fpms-poolds etc/php-fpm.ds/opt/alt/php%s/etc/php-fpm.confsetc/php-fpm.conf.plesksetc/php-fpm.confsusr/bin/php-cgiRRRiucannot execute "%s": %sRs--rereaducannot execute "s --reread": %ss-Handler for alt-php%s was successfully added.(R.RR&R'tsysRtwritetformattostpathtjointextendtexistsRRRR R!R"R#t returncodet Exception(R(R)tphp_pathtcommandt add_commandR*R+R,((s6/opt/alt/alt-php-config/alt-php-panel-configuration.pytplesk_add_php_handlerIsB  3#cCst||ƒo×tid||fƒtiidi||ƒƒdddd||fg}ti|dti dti d t ƒ}|i ƒ\}}|i d jo#td d i|ƒ|fƒ‚ntid ||fƒt Stid||fƒtSdS(Ns%Plesk: Removing alt-php%s-%s handler.s'Plesk: Removing alt-php{0}-{1} handler.s/usr/local/psa/bin/php_handlers--removes-ids alt-php%s-%sRRRiucannot execute "%s": %sRs2Handler for alt-php%s-%s was successfully removed.s#Handler for alt-php%s-%s not exist.(R.RR&R0RR1R2RRR R!R"R#R8R9R5R'(R(R)R;R*R+R,((s6/opt/alt/alt-php-config/alt-php-panel-configuration.pytplesk_remove_php_handlerqs #cCsxyNtiƒ}|djo1tiidƒptdƒ‚n|djoftd||ƒtd||ƒtiid|ƒptiid|ƒotd ||ƒqIqM|d jo]td|ƒtd|ƒtiid|ƒptiid|ƒotd |ƒqIqMtd|ƒotd|ƒo td |ƒSnWn#tj o}t i |ƒt SXd S( sL :rtype: bool :return: If success returns True, otherwise False tPlesks/usr/local/psa/bin/php_handlers)/usr/local/psa/bin/php_handler not exist.Rtfastcgitcgis/etc/init.d/alt-php%s-fpms-/usr/lib/systemd/system/alt-php%s-fpm.serviceR/RN( tcpapit getCPNameR3R4R7R9R=R>R.RR&R'(tmodeR)R:tcp_namete((s6/opt/alt/alt-php-config/alt-php-panel-configuration.pytconfigure_alt_phpƒs&   .   .5 c Cs¬y(ti|ddddgƒ\}}Wn2tij o#}tiidi|ƒƒdSXt}d}g}x¶|D]®\}}|djo!|tjo d}q°|}n|djoPti i d |ƒptiid i|ƒƒdS|i |d |fƒn|djo t }qvqvWt |ƒ} |pFtƒ}| iddig} |D]} | d| q^~ ƒƒnx$|D]\} } t|| | ƒqˆWdS(Nsm:p:vsmode=sphp=R s(cannot parse command line arguments: {0}iRs-ms--modes-ps--phps/opt/alt/php%ssunknown PHP version {0}s-vs --verboseu!installed alt-php versions are %ss s alt-php%s: %s(s-ms--mode(s-ps--php(s-vs --verbose(tgetoptt GetoptErrorR0RR1R2R'tMODESR3R4tisdirRR"RRR&R5RG(tsys_argstoptstargsRFR RDRtopttargtlogt_[1]titverR4((s6/opt/alt/alt-php-config/alt-php-panel-configuration.pytmainžs:(          4 t__main__i(schecksinstalls uninstall(RHRRR3RR0tshutilRtdb.clcommon.cpapitclcommonRBt ImportErrortdetectcpRJRRR.R=R>RGRUt__name__texittargv(((s6/opt/alt/alt-php-config/alt-php-panel-configuration.pyts(          (   !