This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Core bug on the mail creation with PHP 7.2
#1
[Not Solved] Core bug on the mail creation with PHP 7.2
I'm working out on a new installer for the lastest Linux version (Ubuntu and Fedora)

And I've got a problem with the mailcreation module. It's look to be the same kind a problem than PHPmyAdmin. We solve it with the version 4.8.2

https://stackoverflow.com/questions/4800...o/50536059

But with the mail creation I've a got an Apache error 500.

Probably it's almost nothing

This is my error log.

[Tue Aug 14 11:24:27.233060 2018] [php7:error] [pid 7121] [client 192.168.0.110:62277] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function module_controller::ListDomains(), 0 passed in /etc/sentora/panel/modules/mailboxes/code/controller.ext.php on line 320 and exactly 1 expected in /etc/sentora/panel/modules/mailboxes/code/controller.ext.php:122\nStack trace:\n /etc/sentora/panel/modules/mailboxes/code/controller.ext.php(320): module_controller::ListDomains()\nForum Add-ons and Usage /etc/sentora/panel/modules/mailboxes/code/controller.ext.php(269): module_controller::IsValidDomain('test2.ca')\nMySupport Addon /etc/sentora/panel/modules/mailboxes/code/controller.ext.php(149): module_controller::CheckCreateForErrors('te22', 'test2.ca', 'asd')\nTest of MySupport MOD /etc/sentora/panel/modules/mailboxes/code/controller.ext.php(341): module_controller::ExecuteAddMailbox('1', 'te22', 'test2.ca', 'asd')\n#4 /etc/sentora/panel/dryden/runtime/controller.class.php(65): module_controller::doAddMailbox()\n#5 /etc/sentora/panel/inc/init.inc.php(155): runtime_controller->Init()\nForum theme /etc/sentora/panel/index.php(21): require_once('/etc/sentora/pa...')\nInstall Docs-ISPconfig {mai in /etc/sentora/panel/modules/mailboxes/code/controller.ext.php on line 122, referer: http://192.168.0.123/?module=mailboxes&a...AddMailbox

It's look like the only bug I've got for the upgrade til now.

Thank you!

Eulogy Angel
Reply
Thanks given by:
#2
[Not Solved] RE: Core bug on the mail creation with PHP 7.2
(08-15-2018, 04:03 AM)Eulogy Wrote: I'm working out on a new installer for the lastest Linux version (Ubuntu and Fedora)

And I've got a problem with the mailcreation module. It's look to be the same kind a problem than PHPmyAdmin. We solve it with the version 4.8.2

https://stackoverflow.com/questions/4800...o/50536059

But with the mail creation I've a got an Apache error 500.

Probably it's almost nothing

This is my error log.

[Tue Aug 14 11:24:27.233060 2018] [php7:error] [pid 7121] [client 192.168.0.110:62277] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function module_controller::ListDomains(), 0 passed in /etc/sentora/panel/modules/mailboxes/code/controller.ext.php on line 320 and exactly 1 expected in /etc/sentora/panel/modules/mailboxes/code/controller.ext.php:122\nStack trace:\n /etc/sentora/panel/modules/mailboxes/code/controller.ext.php(320): module_controller::ListDomains()\nForum Add-ons and Usage /etc/sentora/panel/modules/mailboxes/code/controller.ext.php(269): module_controller::IsValidDomain('test2.ca')\nMySupport Addon /etc/sentora/panel/modules/mailboxes/code/controller.ext.php(149): module_controller::CheckCreateForErrors('te22', 'test2.ca', 'asd')\nTest of MySupport MOD /etc/sentora/panel/modules/mailboxes/code/controller.ext.php(341): module_controller::ExecuteAddMailbox('1', 'te22', 'test2.ca', 'asd')\n#4 /etc/sentora/panel/dryden/runtime/controller.class.php(65): module_controller::doAddMailbox()\n#5 /etc/sentora/panel/inc/init.inc.php(155): runtime_controller->Init()\nForum theme /etc/sentora/panel/index.php(21): require_once('/etc/sentora/pa...')\nInstall Docs-ISPconfig {mai in /etc/sentora/panel/modules/mailboxes/code/controller.ext.php on line 122, referer: http://192.168.0.123/?module=mailboxes&a...AddMailbox

It's look like the only bug I've got for the upgrade til now.

Thank you!

Eulogy Angel

I too have updated Sentora to PHP 7.2 for testing and also updated to the latest version of Sentora (the "master" repository if that's what it is called), and have found the same issue with adding a mailbox. I also discovered the Aliases, Forwarding and Distribution Lists pages were not loading fully and only load to the select box and no further.

The fixes I have found to work are as follows:

In /etc/sentora/panel/modules/mailboxes/code/controller.ext.php

find the function
Code:
ListDomains($uid)

change the function name to
Code:
ListDomains($uid = null)

and add the following under global $zdbh;
Code:
global $controller;
if (($uid == '') || (empty($uid)) || ($uid == null)) {
    $uid = ctrl_auth::CurrentUserID();
}

In /etc/sentora/panel/modules/forwarders/code/controller.ext.php

find the function
Code:
getMailboxList($uid)

change the function name to
Code:
getMailboxList($uid = null)

and add the following under global $zdbh;
Code:
global $controller;
if (($uid == '') || (empty($uid)) || ($uid == null)) {
    $uid = ctrl_auth::CurrentUserID();
}

In /etc/sentora/panel/modules/distlists/code/controller.ext.php

find the function
Code:
getDomainList($uid)

change the function name to
Code:
getDomainList($uid = null)

and add the following under global $zdbh;
Code:
global $controller;
if (($uid == '') || (empty($uid)) || ($uid == null)) {
    $uid = ctrl_auth::CurrentUserID();
}

In /etc/sentora/panel/modules/aliases/code/controller.ext.php

find the function
Code:
getDomainList($uid)

change the function name to
Code:
getDomainList($uid = null)

and add the following under global $zdbh;
Code:
global $controller;
if (($uid == '') || (empty($uid)) || ($uid == null)) {
    $uid = ctrl_auth::CurrentUserID();
}

Whether these fixes are a backwards step, I don't know, as they reflect the earlier "released" core 1.0.0 files, but these changes seem to fix all of the issues for me.

Keith
Reply
Thanks given by: Eulogy
#3
[Not Solved] RE: Core bug on the mail creation with PHP 7.2
Nice Thank you!!

It's working very well!!!

So I wll try to download a new branch with this version PHP 7.2 compatible
Reply
Thanks given by:
#4
[Not Solved] RE: Core bug on the mail creation with PHP 7.2
(08-21-2018, 05:38 AM)Eulogy Wrote: Nice Thank you!!

It's working very well!!!

So I wll try to download a new branch with this version PHP 7.2 compatible

No problem.

As I said, I'm not sure if the changes (that actually broke the mail modules) were meant to improve something, and I think with PHP 5 they work OK, but bring in PHP 7 (well, 7.2) and that's when it seems to break the changes.

As an aside, I am experimenting with using Snuffleupagus with PHP 7.2 as a Suhosin replacement. It advertises itself as a replacement, although it is not a direct replacement by any means. So far so good but not sure if it is as effective as Suhosin was with PHP 5.

https://snuffleupagus.readthedocs.io/
Reply
Thanks given by:
#5
[Not Solved] RE: Core bug on the mail creation with PHP 7.2
(08-21-2018, 10:58 PM)fearworks Wrote: No problem.

As I said, I'm not sure if the changes (that actually broke the mail modules) were meant to improve something, and I think with PHP 5 they work OK, but bring in PHP 7 (well, 7.2) and that's when it seems to break the changes.

As an aside, I am experimenting with using Snuffleupagus with PHP 7.2 as a Suhosin replacement. It advertises itself as a replacement, although it is not a direct replacement by any means. So far so good but not sure if it is as effective as Suhosin was with PHP 5.

https://snuffleupagus.readthedocs.io/

After a quick read through, Snuffleupagus looks to be promising if Suhosin doesn't come around. I didn't get to check on all of the functions it blocks, but that shouldn't be too hard to sort out.
-TGates - Head of Support

SEARCH the Forums or read the DOCUMENTATION before posting!
Modules Maintained: 13 - Module Installs: 108k+

Find my support or modules helpful? Donate HERE
Get your domains using my affiliate link:
GoDaddy - Domains
Reply
Thanks given by:
#6
[Not Solved] RE: Core bug on the mail creation with PHP 7.2
(08-22-2018, 06:41 AM)TGates Wrote: After a quick read through, Snuffleupagus looks to be promising if Suhosin doesn't come around. I didn't get to check on all of the functions it blocks, but that shouldn't be too hard to sort out.

The list of functions looks to be extensive, including an out-of-the-box config (or "rule") file that doesn't allow Sentora Panel to run without some tweaking...

...and you might ask why I have it running for the panel when Suhosin was only configured to be loaded up for vhost user sites and not the main Sentora panel... or at least that what I think happens with Suhosin but correct me if I'm wrong. The main problem I have found with Snuffleupagus is that if it is configured to run for vhosts, and I open a page of one of my vhosts, the panel then won't run for 30 secs or so. In short, Snuffleupagus is bound into PHP and if the vhosts are set to run with a valid rules file but Sentora doesn't, the vhost rules seem to still run when loading the Sentora panel. My compromise has been to run PHP with a rules file defined regardless of whether it's Sentora or one of the other vhosts on the server, but without the default rules for the "include-related vulnerabilities" as those seem to break Sentora and I don't think Suhosin ever blocked using any of the "include" functions.

Could be tricky to get it working in the same way Suhosin does but so far it's the only thing that sells itself as a PHP 7 replacement for Suhosin that I can find. Certainly worth playing around with...

Keith.
Reply
Thanks given by:


Forum Jump:


Users browsing this thread: 1 Guest(s)