From 3eeaa4b2475c24cd4eb4d1066e2145e256c42cf2 Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 3 Jan 2023 23:28:20 +0100 Subject: [PATCH 1/3] Fixed: Creation of dynamic property Mail_Mbox::$_file is deprecated --- .devilbox/www/include/vendor/Mail/Mbox.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.devilbox/www/include/vendor/Mail/Mbox.php b/.devilbox/www/include/vendor/Mail/Mbox.php index 1e7d684a2..2008bd838 100644 --- a/.devilbox/www/include/vendor/Mail/Mbox.php +++ b/.devilbox/www/include/vendor/Mail/Mbox.php @@ -190,6 +190,12 @@ class Mail_Mbox extends PEAR var $autoReopen = true; + /** + * cytoia added to prevent deprecation warning about dynamically creating + * this variable inside the constructor + */ + var $_file = null; + /** * Create a new Mbox class instance. From 98be814d3cdebb623b02c4953331030c3b6e133b Mon Sep 17 00:00:00 2001 From: cytopia Date: Mon, 30 Jan 2023 11:15:32 +0100 Subject: [PATCH 2/3] Fix various issues for Release v3.0.0-beta-0.4 --- .devilbox/www/config.php | 4 +- .devilbox/www/htdocs/cnc.php | 127 ++++++++++++++---- .devilbox/www/include/lib/container/Httpd.php | 2 +- CHANGELOG.md | 16 +++ docker-compose.yml | 5 +- 5 files changed, 121 insertions(+), 33 deletions(-) diff --git a/.devilbox/www/config.php b/.devilbox/www/config.php index 59ca653fb..b8a45d830 100644 --- a/.devilbox/www/config.php +++ b/.devilbox/www/config.php @@ -13,8 +13,8 @@ putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1'); -$DEVILBOX_VERSION = 'v3.0.0-beta-0.3'; -$DEVILBOX_DATE = '2023-01-02'; +$DEVILBOX_VERSION = 'v3.0.0-beta-0.4'; +$DEVILBOX_DATE = '2023-01-30'; $DEVILBOX_API_PAGE = 'devilbox-api/status.json'; // diff --git a/.devilbox/www/htdocs/cnc.php b/.devilbox/www/htdocs/cnc.php index 2456479bd..01f10c22f 100644 --- a/.devilbox/www/htdocs/cnc.php +++ b/.devilbox/www/htdocs/cnc.php @@ -2,31 +2,39 @@ authPage(); ?> exec('supervisorctl -c ' . $supervisor_config_file . ' ' . $command); +function run_supervisor_command($host, $command) { + if ($host == 'httpd') { + $supervisor_config_file = '/tmp/supervisorctl.conf'; + $port = getenv('SVCTL_LISTEN_PORT'); + $user = getenv('SVCTL_USER'); + $pass = getenv('SVCTL_PASS'); + + $content = "[supervisorctl]\n"; + $content .= "serverurl=http://httpd:" . $port . "\n"; + $content .= "username=" . $user . "\n"; + $content .= "password=" . $pass . "\n"; + + $fp = fopen($supervisor_config_file, 'w'); + fwrite($fp, $content); + fclose($fp); + + return loadClass('Helper')->exec('supervisorctl -c ' . $supervisor_config_file . ' ' . $command); + } else if ($host == 'php') { + return loadClass('Helper')->exec('sudo supervisorctl ' . $command); + } } ?> -redirect('/cnc.php'); -} +redirect('/cnc.php'); + } else if ( isset($_POST['php-fpm']) && $_POST['php-fpm'] == 'reload' ) { + run_supervisor_command('php', 'restart php-fpm'); + loadClass('Helper')->redirect('/cnc.php'); + } ?> @@ -46,8 +54,9 @@ function run_supervisor_command($command) {
isset($words[3]) ? preg_replace('/,$/', '', $words[3]) : '', 'uptime' => isset($words[5]) ? $words[5] : '', ); + $words = preg_split("/\s+/", $status_p); + $data_p = array( + 'name' => isset($words[0]) ? $words[0] : '', + 'state' => isset($words[1]) ? $words[1] : '', + 'pid' => isset($words[3]) ? preg_replace('/,$/', '', $words[3]) : '', + 'uptime' => isset($words[5]) ? $words[5] : '', + ); ?>

Daemon overview


-

If you made any changes to vhost settings (vhost-gen templates or backend configuration) or to the webserver configuration itself, you can trigger a manual reload of watcherd here to apply them. No need to restart the Docker Compose stack.

+ + - + + + + + + + + + + + + - + + +
DaemonContainer Status Pid UptimeInfo Action
php
httpd
httpd
@@ -99,7 +129,7 @@ function run_supervisor_command($command) {

watcherd stderr


'; foreach(preg_split("/((\r?\n)|(\r\n?))/", $output) as $line) { if ( strpos($line, "[ERR]") !== false ) { @@ -120,7 +150,7 @@ function run_supervisor_command($command) {

watcherd stdout


'; foreach(preg_split("/((\r?\n)|(\r\n?))/", $output) as $line) { $pos_info = strpos($line, "[INFO]"); @@ -142,6 +172,47 @@ function run_supervisor_command($command) {
+ + + + + getFooter(); ?>