Page 1 of 1

Help Desk General Settings

Posted: Tue Oct 13, 2020 4:29 pm
by rcatalano
Script URL: local
Version of script: 3.1.2
Hosting company: n/a
URL of phpinfo.php: local
URL of session_test.php:
What terms did you try when SEARCHING for a solution: General Settings

Write your message below:
Hello, I installed the 3.1.2 version of Hesk on a CentOS8 system. Everything seems to work Settings > General. I can't make any changes to the data.

Here's the only information that's displayed:
General settings
Website title Website
Website URL http://www.example.com
Help desk title Help Desk
Help desk URL http://www.example.com/helpdesk
Webmaster email support@example.com
«From:» email support@example.com
«From:» name Help Desk
Site theme

Here's the versions:
Checking status
HESK version 3.1.2 - HESK is up to date
PHP version 7.2.24 (MySQLi)
MySQL version 10.3.17-MariaDB
/hesk_settings.inc.php Exists, Writable
/attachments Exists, Writable
/cache Exists, Writable

Please help!
Rich

Re: Help Desk General Settings

Posted: Tue Oct 13, 2020 5:55 pm
by Klemen
1. Did you upload the entire "theme" folder to your help desk?

2. Do other settings subpages work? Can you enable Debug mode on the "Help desk" subpage then see if there are any error messages displaed on the General page?

Re: Help Desk General Settings

Posted: Tue Oct 13, 2020 6:16 pm
by rcatalano
Hello Klemen, here are my answers:

1. Did you upload the entire "theme" folder to your help desk?

Here's the folder(s) under ~/theme
# pwd
/var/www/html/helpdesk/theme/hesk3/customer
# ll
total 32
drwxr-xr-x 2 root root 96 Oct 13 12:19 create-ticket
drwxr-xr-x 2 root root 72 Oct 13 12:19 css
-rw-r--r-- 1 root root 5366 Oct 13 08:34 error.php
drwxr-xr-x 2 root root 192 Oct 13 12:19 fonts
-rw-r--r-- 1 root root 98 Oct 13 08:34 header.php
drwxr-xr-x 2 root root 161 Oct 13 12:19 img
-rw-r--r-- 1 root root 16333 Oct 13 08:34 index.php
drwxr-xr-x 2 root root 232 Oct 13 12:19 js
drwxr-xr-x 2 root root 81 Oct 13 12:19 knowledgebase
-rw-r--r-- 1 root root 4008 Oct 13 08:34 maintenance.php
drwxr-xr-x 2 root root 88 Oct 13 12:19 util
drwxr-xr-x 3 root root 60 Oct 13 12:19 view-ticket
#

2. Do other settings subpages work?
Yes, the other settings pages work as expected. However, the Email Templates page says the files are "Not writable"

3. Can you enable Debug mode on the "Help desk" subpage then see if there are any error messages displaed on the General page?
I enabled Settings > Help Desk > Debug mode > Save changes and there are no errors displayed on the General page.

Thank you for helping,
Rich

Re: Help Desk General Settings

Posted: Tue Oct 13, 2020 6:43 pm
by Klemen
Strange.

Is there any error_log file in your helpdesk or helpdesk/admin folder?

Any chance you can give me FTP access to your help desk?

The "not writable" error for emails should be fixed by CHMOD-ing the email template files located in language/english/emails to 666 (rw-rw-rw-)

Re: Help Desk General Settings

Posted: Tue Oct 13, 2020 6:54 pm
by rcatalano
I searched for "error_log" and didn't find any files.
This is a LAN server behind firewalls with no external access.
The chmod 666 fixed the Email templates.

Any additional ideas?

Re: Help Desk General Settings

Posted: Tue Oct 13, 2020 7:23 pm
by Klemen
Maybe your phpinfo can give a clue?

Re: Help Desk General Settings

Posted: Tue Oct 13, 2020 8:10 pm
by rcatalano
Here's the PHP error log from /var/log/php-fpm/www-error.log:
[13-Oct-2020 14:14:19 America/New_York] PHP Fatal error: Uncaught Error: Call to undefined function json_decode() in /var/www/html/helpdesk/admin/admin_settings_general.php:531
Stack trace:
#0 /var/www/html/helpdesk/admin/admin_settings_general.php(234): hesk_testTheme(1)
#1 {main}
thrown in /var/www/html/helpdesk/admin/admin_settings_general.php on line 531
[13-Oct-2020 14:14:36 America/New_York] PHP Fatal error: Uncaught Error: Call to undefined function json_decode() in /var/www/html/helpdesk/admin/admin_settings_general.php:531
Stack trace:
#0 /var/www/html/helpdesk/admin/admin_settings_general.php(234): hesk_testTheme(1)
#1 {main}
thrown in /var/www/html/helpdesk/admin/admin_settings_general.php on line 531
[13-Oct-2020 14:14:49 America/New_York] PHP Fatal error: Uncaught Error: Call to undefined function json_decode() in /var/www/html/helpdesk/admin/admin_settings_general.php:531
Stack trace:
#0 /var/www/html/helpdesk/admin/admin_settings_general.php(234): hesk_testTheme(1)
#1 {main}
thrown in /var/www/html/helpdesk/admin/admin_settings_general.php on line 531
[13-Oct-2020 14:15:48 America/New_York] PHP Fatal error: Uncaught Error: Call to undefined function json_decode() in /var/www/html/helpdesk/admin/admin_settings_general.php:531
Stack trace:
#0 /var/www/html/helpdesk/admin/admin_settings_general.php(234): hesk_testTheme(1)
#1 {main}
thrown in /var/www/html/helpdesk/admin/admin_settings_general.php on line 531
[13-Oct-2020 14:52:25 America/New_York] PHP Fatal error: Uncaught Error: Call to undefined function json_decode() in /var/www/html/helpdesk/admin/admin_settings_general.php:531
Stack trace:
#0 /var/www/html/helpdesk/admin/admin_settings_general.php(234): hesk_testTheme(1)
#1 {main}
thrown in /var/www/html/helpdesk/admin/admin_settings_general.php on line 531


Here's the information for lines 527 to 535 in /var/www/html/helpdesk/admin/admin_settings_general.php:

// Build markup
if ($add) {
// Pull the name from config.json
$config = file_get_contents($dir . $subdir . '/config.json');
$config_json = json_decode($config, true);

$html .= '<option value="'.$subdir.'" '.($hesk_settings['site_theme'] === $subdir ? 'selected' : '').'>'.$config_json['name'].'</option>';
}
}

Re: Help Desk General Settings

Posted: Wed Oct 14, 2020 9:52 am
by rcatalano
Figured out the problem: Updated to PHP 7.4.11. I suspect it was related to PHP/json support. The Settings > General settings page works as expected now.
Thank you,
Rich

Re: Help Desk General Settings

Posted: Wed Oct 14, 2020 10:43 am
by Klemen
Yep, that's it, you didn't have JSON support enabled in 7.2. We need to add a check and notice for that.

Glad you got it working.