WillyXJ/facileManager

[BUG] Parse error: syntax error, unexpected ')' in /var/www/data/fm/fm-modules/fmDNS/classes/class_http.php on line 465

ksuuk opened this issue · 4 comments

fM Version : v4.6.1
fmDNS Version : v4.6.1

CentOS Linux release 7.9.2009 (Core)
PHP 5.6.40 (cli) (built: Apr 10 2024 15:04:15)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
mysql Ver 14.14 Distrib 5.6.51, for Linux (x86_64) using EditLine wrapper

In raising this issue, I confirm the following (please check boxes, eg [X]):

  • I have read and understood the contributors guide.
  • I have checked that the bug-fix I am reporting can be replicated, or that the feature I am suggesting isn't already present.
  • I have checked that the issue I'm posting isn't already reported.
  • I have checked that the issue I'm posting isn't already solved and no duplicates exist in closed issues and opened issues
  • I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion.

(BUG | ISSUE) Expected Behavior:

I can use software without error.

(BUG | ISSUE) Actual Behavior:

I can’t use software due error.

(BUG | ISSUE) Steps to reproduce:

Brand new (first) facileManager installation, only fmDNS module installed/active, no data added yet, and I can’t add new dns server or add/change/disable/delete any dns settings under config > options, due error:

Parse error: syntax error, unexpected ')' in /var/www/data/fm/fm-modules/fmDNS/classes/class_http.php on line 465

Thanks for the report. Remove the comma from line 464. It seems PHP 8 is more forgiving with extra commas. This will be fixed in the next release.

@WillyXJ

Thanks, fixing that error helped, then got another error:
Parse error: syntax error, unexpected ')' in /var/www/data/fm/fm-modules/fmDNS/classes/class_tls.php on line 477

So I also removed the comma from line 476 and got futher, nomore errors.

Then dumped current zones (rndc dumpdb -zones) but could not import it:
Import failed to create the 0.0.127.in-addr.arpa zone. Could not add the zone because a database error occurred.

Database error: [Column 'domain_name_servers' cannot be null | Query: [INSERT INTO fm_dns_domains (domain_name,domain_mapping,domain_view,domain_name_servers,domain_dynamic,domain_dnssec,domain_dnssec_sig_expire,domain_dnssec_generate_ds,domain_dnssec_sign_inline,domain_clone_dname,domain_template_id,account_id) VALUES ('0.0.127.in-addr.arpa','reverse','1',NULL,'no','no','0','no','no',NULL,'0','1')]]

BTW, why I must dump and import the current BIND zones? I’d prefer, that facileManager just manages the current BIND config and zone files directly.

What steps did you take to create the zone and get that database error? I'm currently unable to reproduce it.

BTW, why I must dump and import the current BIND zones? I’d prefer, that facileManager just manages the current BIND config and zone files directly.

fmDNS is database-driven and generates the zone data based on what's shown in the web interface. It's unable to manage an existing installation without overwriting the files.

This is now fixed in fmDNS 6.0.5 and later.