ictinnovations / ictfax

Open Source Fax Server Software supporting inbound and outbound faxing. ICTFAX can be used in following faxing scenarios Web to fax, Fax to Web or Online Fax Email to fax and fax to email ATA / Extensions to send and receive faxes via Fax machine using internet REST based Fax API’s to integrate with third party applications and automate business process G.711 based Fax Origination / Termination / Gateway T.38 based Fax Origination / Termination PSTN based Fax Origination / Termination / Gateway
http://www.ictfax.org
GNU General Public License v3.0
173 stars 60 forks source link

ICTFAX Site jumping back to Dashboard #67

Open miscellaniuz opened 3 years ago

miscellaniuz commented 3 years ago

Hey,

the Site is stuck at Dashboard. I can try click anything on the site, it shows me the page for near half a second and then jumps back to Dashboard.

Installation via script and manually. No change. I checked issue #62 cause I had the same problems regarding empty blue site, but with changes made in httpd.conf login works fine.

Further information:

-CentOS 7 -selinux off -httpd.conf not changed except changes of issue #62 -installation steps exactly https://ictfax.org/content/ictfax-installation-guide -journalctlnothing special -URL saying http://x.x.x.x/pages/dashboard, click on something is referring to http://x.x.x.x/provider/provider or /did/did for example -tried Firefox and Edge, nothing changed, same issue

Any ideas?

edit: found that something triggers an event that updates the classes of body (I found the pace-runner changing, so that's only the loading bar at the top, but maybe it helps identifying the error): grafik

dubyatp commented 3 years ago

I also come here from #61 , having the same exact problem as you. I'm weary of giving the project maintainers SSH access to our server since we do have a pretty stringent security policy regarding giving random people root access to servers.

ICTKashif commented 3 years ago

We will setup ICTFax on our server, and we will re-produce the issue. and then we will let you know. Thanks

miscellaniuz commented 2 years ago

Any updates available?

zhongshanliyu commented 2 years ago

seem php verison issue php -v PHP 5.4.16 (cli) (built: Apr 1 2020 04:07:17) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

/var/log/httpd/error_log PHP Fatal error: Class 'ICT\Core\ICT\Core\Conf\User' not found in /usr/ictcore/core/lib/common.php on line 132

/usr/ictcore/log/ictcore.log [2021-12-12 09:05:36] [3461] [WARNING] Session write failed

JoshIPT commented 2 years ago

+1 to this issue. Any update?

ICTKashif commented 2 years ago

please share the /usr/ictcore/log/ictcore.log and apache logs with us

JoshIPT commented 2 years ago

I zero'd the log and then performed a login attempt. This is the exact content of the log from the login.

[root@fax core]# cat /usr/ictcore/log/ictcore.log

[2021-12-13 21:24:06] [17780] [WARNING] Session read found zero rows
[2021-12-13 21:24:07] [16577] [ERROR] User not permitted to perform required action
[2021-12-13 21:24:07] [17780] [WARNING] Session write failed
[2021-12-13 21:24:07] [23858] [WARNING] Session write failed
[2021-12-13 21:24:07] [29678] [WARNING] Session write failed
[2021-12-13 21:24:07] [27812] [WARNING] Session write failed
[2021-12-13 21:24:07] [16529] [WARNING] Session write failed
[2021-12-13 21:24:07] [29678] [WARNING] Session write failed

No error in the apache log

miscellaniuz commented 2 years ago

I zero'd the log and then performed a login attempt. This is the exact content of the log from the login.

[root@fax core]# cat /usr/ictcore/log/ictcore.log

[2021-12-13 21:24:06] [17780] [WARNING] Session read found zero rows
[2021-12-13 21:24:07] [16577] [ERROR] User not permitted to perform required action
[2021-12-13 21:24:07] [17780] [WARNING] Session write failed
[2021-12-13 21:24:07] [23858] [WARNING] Session write failed
[2021-12-13 21:24:07] [29678] [WARNING] Session write failed
[2021-12-13 21:24:07] [27812] [WARNING] Session write failed
[2021-12-13 21:24:07] [16529] [WARNING] Session write failed
[2021-12-13 21:24:07] [29678] [WARNING] Session write failed

No error in the apache log

Same for me, despite not getting [ERROR] User not permitted to perform required action My php version and httpd log:

[root@localhost ~]# php -v
PHP 5.4.16 (cli) (built: Apr  1 2020 04:07:17)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
[root@localhost ~]# cat /var/log/httpd/error_log
[Sun Dec 12 03:49:01.918379 2021] [lbmethod_heartbeat:notice] [pid 4591] AH02282: No slotmem from mod_heartmonitor
[Sun Dec 12 03:49:01.940930 2021] [mpm_prefork:notice] [pid 4591] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16 configured -- resuming normal operations
[Sun Dec 12 03:49:01.940946 2021] [core:notice] [pid 4591] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
n00dl3s commented 2 years ago

@miscellaniuz Same issue, I believe we have the same setup.

josslec commented 2 years ago

It's a namespace issue. In /usr/ictcore/core/lib/common.php, on line 132, replace : ICT\Core\Conf\User::load(); by Conf\User::load();

JoshIPT commented 2 years ago

I don't believe this to be the issue, mine already reads Conf\User::load(); This would throw an error in the log if it were a namespace issue.

I did have to fix a few namespace issues while setting up originally, so this may well be something I have already done. However, still get the redirect issue.

n00dl3s commented 2 years ago

It's a namespace issue. In /usr/ictcore/core/lib/common.php, on line 132, replace : ICT\Core\Conf\User::load(); by Conf\User::load();

Thank you so much, I don't know PHP that well, but that did solve the issue.

ICTKashif commented 2 years ago

We have released the new version of ICTFax with fixes, you can install the new version.

thiagopollachini commented 2 years ago

I have the same issue here. The namespace issue was patched on the latest yum package, but this dashboard jump back with the error "User not permitted to perform required action" in ictcore.log is still there. Almost quitting here...

JoshIPT commented 2 years ago

Same.. I pretty much quit.. the VM is still running but I haven't touched it. So close, but so far..

ICTKashif commented 2 years ago

please run the following commands

yum install ictcore-voice
mysql ictfax < /usr/ictcore/db/voice.sql

If the problem still exists then please share the following logs with us

tail -f /usr/ictcore/log/ictcore.log /var/log/httpd/error_log
JoshIPT commented 2 years ago

Tried these commands then tailed the requested log files and the error still exists but no errors in the log files, sorry.

Had to adjust the mysql command to be

mysql ictcore < /usr/ictcore/db/voice.sql

and it did complain that the recording table already existed.

ICTKashif commented 2 years ago

please also verify the following

Confirm the document root path

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/usr/ictfax"

# Further relax access to the default document root:
<Directory "/usr/ictfax">

SELinux and firewall are disabled

access ICTFax portal in private mode after above changes

thiagopollachini commented 2 years ago

tail -f /usr/ictcore/log/ictcore.log /var/log/httpd/error_log ==> /usr/ictcore/log/ictcore.log <== [2022-08-13 14:52:10] [3010] [DEBUG] DB:query executed on table: campaign [2022-08-13 14:52:10] [3010] [DEBUG] DB:query executed on table: contact_group [2022-08-13 14:52:10] [3010] [DEBUG] DB:query executed on table: contact [2022-08-13 14:52:10] [3010] [DEBUG] DB:query executed on table: transmission [2022-08-13 14:52:10] [3010] [DEBUG] DB:query executed on table: transmission [2022-08-13 14:52:10] [3010] [DEBUG] DB:query executed on table: transmission [2022-08-13 14:52:10] [3010] [DEBUG] DB:query executed on table: transmission [2022-08-13 14:52:10] [3010] [DEBUG] Session write requested with id: u40sfmapurj8flas0e4rfsf723 [2022-08-13 14:52:10] [3010] [WARNING] Session write failed [2022-08-13 14:52:10] [3010] [DEBUG] Session close requested

==> /var/log/httpd/error_log <== [Fri Aug 12 17:06:44.195738 2022] [core:error] [pid 21046] [client 95.161.131.235:57204] AH00126: Invalid URI in request GET /../../mnt/mtd/Config/Account1 HTTP/1.1 [Fri Aug 12 19:14:53.613426 2022] [core:error] [pid 83073] [client 185.7.214.117:44574] AH00126: Invalid URI in request POST /cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh HTTP/1.1 [Sat Aug 13 09:49:50.650425 2022] [:error] [pid 21047] [client 150.158.140.96:50260] script '/usr/ictfax/xmlrpc.php' not found or unable to stat [Sat Aug 13 10:16:19.678728 2022] [:error] [pid 51646] [client 185.7.214.117:55466] script '/usr/ictfax/index.php' not found or unable to stat [Sat Aug 13 10:50:57.658944 2022] [mpm_prefork:notice] [pid 19963] AH00170: caught SIGWINCH, shutting down gracefully [Sat Aug 13 10:51:33.922795 2022] [suexec:notice] [pid 2597] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using ctsfax.aplusvoip.net. Set the 'ServerName' directive globally to suppress this message [Sat Aug 13 10:51:34.006294 2022] [lbmethod_heartbeat:notice] [pid 2597] AH02282: No slotmem from mod_heartmonitor [Sat Aug 13 10:51:34.766290 2022] [mpm_prefork:notice] [pid 2597] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16 configured -- resuming normal operations [Sat Aug 13 10:51:34.766372 2022] [core:notice] [pid 2597] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

apoonawa commented 2 years ago

Hi. Am facing the same problem. After successful login am redirected to the login page.

==> /var/log/httpd/error_log <== [Sun Sep 18 16:23:26.886238 2022] [lbmethod_heartbeat:notice] [pid 22601] AH02282: No slotmem from mod_heartmonitor [Sun Sep 18 16:23:26.911685 2022] [mpm_prefork:notice] [pid 22601] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16 configured -- resuming normal operations [Sun Sep 18 16:23:26.911745 2022] [core:notice] [pid 22601] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND' [Mon Sep 19 02:35:48.813238 2022] [mpm_prefork:notice] [pid 22601] AH00170: caught SIGWINCH, shutting down gracefully [Mon Sep 19 02:35:49.864057 2022] [core:notice] [pid 13984] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0 [Mon Sep 19 02:35:49.864754 2022] [suexec:notice] [pid 13984] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using ::1. Set the 'ServerName' directive globally to suppress this message [Mon Sep 19 02:35:49.880875 2022] [lbmethod_heartbeat:notice] [pid 13984] AH02282: No slotmem from mod_heartmonitor [Mon Sep 19 02:35:49.897219 2022] [mpm_prefork:notice] [pid 13984] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16 configured -- resuming normal operations [Mon Sep 19 02:35:49.897239 2022] [core:notice] [pid 13984] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

==> /usr/ictcore/log/ictcore.log <== [2022-09-19 02:37:52] [13990] [WARNING] Session write failed [2022-09-19 02:37:52] [14142] [ERROR] User not permitted to perform required action [2022-09-19 02:37:52] [13986] [WARNING] Session write failed [2022-09-19 02:37:52] [14142] [WARNING] Session write failed [2022-09-19 02:37:52] [13988] [WARNING] Session write failed [2022-09-19 02:37:52] [14134] [WARNING] Session write failed [2022-09-19 02:37:52] [13989] [WARNING] Session write failed [2022-09-19 02:37:52] [13990] [WARNING] Session write failed

apoonawa commented 2 years ago

Problem is your requirements are Centos 7 and php 5.3.3. This is not possible, Centos 7 ships minimum with php 5.4.16. And Centos 6 is already end of life so most hosts don't support spinning up Centos 6 instances.

ICTKashif commented 2 years ago

Problem is your requirements are Centos 7 and php 5.3.3. This is not possible, Centos 7 ships minimum with php 5.4.16. And Centos 6 is already end of life so most hosts don't support spinning up Centos 6 instances.

Please share the SSH access at https://service.ictinnovations.com/submitticket.php , we will check and update you accordingly

rw180800 commented 2 years ago

this looks to be still a problem? users cannot login, admin can... the login says success and then flicks back to the login screen.

ICTKashif commented 2 years ago

Please share the ictcore.log with us. Please also check the database connection (you check the allowed database access from /etc/ictcore.conf) and the firewall and SELinux are disabled

rw180800 commented 2 years ago

thanks, quick reply!
itcore.log for user login: [2022-10-21 06:56:15] [8090] [WARNING] Session read found zero rows [2022-10-21 06:56:16] [2077] [WARNING] Session write failed [2022-10-21 06:56:16] [1104] [WARNING] Session write failed [2022-10-21 06:56:16] [1106] [ERROR] User not permitted to perform required action [2022-10-21 06:56:16] [1106] [WARNING] Session write failed [2022-10-21 06:56:16] [2074] [WARNING] Session write failed [2022-10-21 06:56:16] [1541] [WARNING] Session write failed [2022-10-21 06:56:16] [8090] [WARNING] Session write failed

selinux is disabled, how do I check the firewall?

rw180800 commented 2 years ago

ictcore.conf .. this bit? Basically all as listed in the install process.

[db] host = localhost port = 3306 user = ictfaxuser pass = *** name = ictfax type = mysql

apoonawa commented 2 years ago

Disable selinux again. You have to do it everytime you reboot the system.

On Fri, Oct 21, 2022 at 1:58 AM rw180800 @.***> wrote:

thanks, quick reply! itcore.log for user login: [2022-10-21 06:56:15] [8090] [WARNING] Session read found zero rows [2022-10-21 06:56:16] [2077] [WARNING] Session write failed [2022-10-21 06:56:16] [1104] [WARNING] Session write failed [2022-10-21 06:56:16] [1106] [ERROR] User not permitted to perform required action [2022-10-21 06:56:16] [1106] [WARNING] Session write failed [2022-10-21 06:56:16] [2074] [WARNING] Session write failed [2022-10-21 06:56:16] [1541] [WARNING] Session write failed [2022-10-21 06:56:16] [8090] [WARNING] Session write failed

selinux is disabled, how do I check the firewall?

— Reply to this email directly, view it on GitHub https://github.com/ictinnovations/ictfax/issues/67#issuecomment-1286539978, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF3UNLWYK5B7MAQOGKI6ARTWEI5JXANCNFSM5HENVKWA . You are receiving this because you commented.Message ID: @.***>

rw180800 commented 2 years ago

thanks, I did set selinux as disabled in config. Is there another firewall setting to check as well?

rw180800 commented 2 years ago

any ideas? If I give the user admin permission then they can login ... A user can send an email to fax and it is processed, just cant login to the web interface. Must be a quick permission change somewhere..

rw180800 commented 2 years ago

is there a fix for the user login? If I add admin to their profile they can login, they cannot if set only as user.

ICTKashif commented 2 years ago

Please login as admin, edit the user account and check user role and status..

status must be active=yes user role must be = user

rw180800 commented 2 years ago

image that is what I have?

ICTKashif commented 2 years ago

Please add user_list permission for user role. in my case, user_role id = 1 and user_list permission is = 74, and here is my query and problem fixed

#root_user > mysql ictfax
#mysql_cli > insert role_permission (role_id, permission_id) values (1,74);

Than test it again.

rw180800 commented 2 years ago

This is a default install followng th steps online.

user is 1 and admn is 2?

MariaDB [(none)]> mysql ictfax -> insert role_permission (role_id, permission_id) values (1,74); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mysql ictfax insert role_permission (role_id, permission_id) values (1,74)' at line 1 MariaDB [(none)]>

ICTKashif commented 2 years ago

If you already in MYSQL CLI then just run the following command

insert role_permission (role_id, permission_id) values (1,74);

rw180800 commented 2 years ago

that works, thanks!

rw180800 commented 2 years ago

as a user I can access other users faxes? A legal department may not want general users accessing their faxes ... or would I need to use the multi tenant version for this?

ICTKashif commented 2 years ago

service provider edition will fulfill your requirement because its support multi-user and multi-tenant

rw180800 commented 2 years ago

It would and it looks exactly the product we want. But I need to have the current version working and manageable. I have a lot of 'processing' calls and email still seems to be an issue.

tahiralmas commented 2 years ago

Do you referring processing calls from demo , we have not configured fax gateway / truk in demo that is why status of faxes keep showing processing

ICTFax SP is in production and a lot of customers across globe deployed it and running services successfully

regards

On Tue, Nov 1, 2022 at 3:02 AM rw180800 @.***> wrote:

It would and it looks exactly the product we want. But I need to have the current version working and manageable. I have a lot of 'processing' calls and email still seems to be an issue.

— Reply to this email directly, view it on GitHub https://github.com/ictinnovations/ictfax/issues/67#issuecomment-1297740358, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA5QBIJH23YRTNATBHLETTWGA6XVANCNFSM5HENVKWA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Tahir Almas Project Manager ICT Innovations Leveraging Open Source in ICT Lahore - Pakistan

rw180800 commented 2 years ago

this is on our system. Is there a way to stop the 'processing' and mark 'failed'?

ICTKashif commented 2 years ago

Please check the ictcore.log and apache log.

tail -f /usr/ictcore/log/ictcore.log
tail -f /var/log/httpd/error_log

then send a fax from web portal

rw180800 commented 2 years ago

I get a lot of below, and this seems to be part of the 'proesssing' ...

[2022-11-02 04:59:12] [18265] [WARNING] Session write failed [2022-11-02 04:59:12] [4407] [WARNING] Session write failed [2022-11-02 04:59:17] [18265] [WARNING] Session write failed [2022-11-02 04:59:17] [4407] [WARNING] Session write failed [2022-11-02 04:59:17] [18265] [WARNING] Session write failed [2022-11-02 04:59:17] [4407] [WARNING] Session write failed [2022-11-02 04:59:17] [18265] [WARNING] Session write failed [2022-11-02 04:59:22] [4407] [WARNING] Session write failed [2022-11-02 04:59:22] [18265] [WARNING] Session write failed [2022-11-02 04:59:22] [4407] [WARNING] Session write failed [2022-11-02 04:59:23] [4407] [WARNING] Session write failed [2022-11-02 04:59:27] [18265] [WARNING] Session write failed [2022-11-02 04:59:27] [4407] [WARNING] Session write failed [2022-11-02 04:59:27] [18265] [WARNING] Session write failed [2022-11-02 04:59:27] [4407] [WARNING] Session write failed [2022-11-02 04:59:32] [4407] [WARNING] Session write failed [2022-11-02 04:59:32] [18265] [WARNING] Session write failed [2022-11-02 04:59:32] [4407] [WARNING] Session write failed [2022-11-02 04:59:32] [18265] [WARNING] Session write failed [2022-11-02 04:59:32] [4407] [WARNING] Session write failed [2022-11-02 04:59:37] [18265] [WARNING] Session write failed [2022-11-02 04:59:37] [4407] [WARNING] Session write failed [2022-11-02 04:59:37] [18265] [WARNING] Session write failed [2022-11-02 04:59:37] [4407] [WARNING] Session write failed [2022-11-02 04:59:42] [4407] [WARNING] Session write failed [2022-11-02 04:59:42] [18265] [WARNING] Session write failed [2022-11-02 04:59:43] [18265] [WARNING] Session write failed [2022-11-02 04:59:43] [4407] [WARNING] Session write failed [2022-11-02 04:59:47] [18265] [WARNING] Session write failed

and also

[2022-11-02 04:44:05] [30275] [WARNING] DB:update error table: spool_result error: Unknown column 'inbound' in 'field list' receive fax id 487.txt

rw180800 commented 2 years ago

probably best moved to #77?