cypht icon indicating copy to clipboard operation
cypht copied to clipboard

Unable to permanently save account settings to the database

Open ivanov17 opened this issue 8 months ago • 4 comments

🐛 Bugreport

After changing my account settings I can't save the changes to database. It seems really strange because I can log into the Cypht interface. So I believe my datatabase credentials stored in the Cypht settings file must be correct.

After trying to save changes, the page reloads and I see that the changes are not saved:

Screen Shot 2023-11-03 at 17 57 14

At the same time I see the following in the logs:

2023/11/03 13:56:23 [notice] 22929#22929 [unit] #22899: php message: PHP Deprecated:  Creation of dynamic property Hm_Redis::$socket is deprecated in /data/mail.anarhist.net/lib/cache.php on line 234
2023/11/03 13:56:23 [notice] 22929#22929 [unit] #22899: php message: PHP Deprecated:  Creation of dynamic property Hm_Module_Exec::$cache is deprecated in /data/mail.anarhist.net/lib/modules_exec.php on line 151
2023/11/03 13:56:23 [notice] 22929#22929 [unit] #22899: php message: PHP Deprecated:  Creation of dynamic property Hm_Redis::$socket is deprecated in /data/mail.anarhist.net/lib/cache.php on line 234
2023/11/03 13:56:23 [notice] 22929#22929 [unit] #22899: php message: Array
(
    [0] => Using Hm_Redis_Session with Hm_Auth_IMAP
    [1] => Using DB user configuration
    [2] => Already registered module for message re-attempted: imap_show_message
    [3] => Already registered module for message re-attempted: imap_message_list_type
    [4] => Already registered module for message re-attempted: imap_server_ids
    [5] => Using sapi: cli-server
    [6] => Request type: HTTP
    [7] => Request path: /
    [8] => TLS request: 0
    [9] => Mobile request: 0
    [10] => Page ID: save
    [11] => Using Hm_Cache for cache
    [12] => CACHE backend using: redis
    [13] => LOGGED IN
    [14] => Redirecting to /?page=save
    [15] => PHP version 8.2.12
    [16] => Zend version 4.2.12
    [17] => Peak Memory: 2048
    [18] => PID: 22929
    [19] => Included files: 84
)

2023/11/03 13:56:23 [notice] 22942#22942 [unit] #22900: php message: PHP Deprecated:  Creation of dynamic property Hm_Redis::$socket is deprecated in /data/mail.anarhist.net/lib/cache.php on line 234
2023/11/03 13:56:23 [notice] 22942#22942 [unit] #22900: php message: PHP Deprecated:  Creation of dynamic property Hm_Module_Exec::$cache is deprecated in /data/mail.anarhist.net/lib/modules_exec.php on line 151
2023/11/03 13:56:23 [notice] 22942#22942 [unit] #22900: php message: PHP Deprecated:  Creation of dynamic property Hm_Redis::$socket is deprecated in /data/mail.anarhist.net/lib/cache.php on line 234
2023/11/03 13:56:23 [notice] 22942#22942 [unit] #22900: php message: Array
(
    [0] => Using Hm_Redis_Session with Hm_Auth_IMAP
    [1] => Using DB user configuration
    [2] => Already registered module for message re-attempted: imap_show_message
    [3] => Already registered module for message re-attempted: imap_message_list_type
    [4] => Already registered module for message re-attempted: imap_server_ids
    [5] => Using sapi: cli-server
    [6] => Request type: HTTP
    [7] => Request path: /
    [8] => TLS request: 0
    [9] => Mobile request: 0
    [10] => Page ID: save
    [11] => Using Hm_Cache for cache
    [12] => CACHE backend using: redis
    [13] => LOGGED IN
    [14] => TRANSLATION NOT FOUND :Profile updated:
    [15] => TRANSLATION NOT FOUND :Special folder assigned:
    [16] => PHP version 8.2.12
    [17] => Zend version 4.2.12
    [18] => Peak Memory: 2048
    [19] => PID: 22942
    [20] => Included files: 85
)

2023/11/03 13:56:28 [info] 4#8 *3408 recv(12, 7F02F8018258, 2048, 0) failed (104: Connection reset by peer)

Besides the Save button, I also tried the Save and Logout button. In this case changes are also not saved and the session does not end. Same thing when I tried to save changes when clicking Logout in the main menu.

The user_config_type parameter is set to DB.

This issue may be related to https://github.com/cypht-org/cypht/issues/817 but I can't be completely sure.

Version & Environment

Rev: v1.4.0

OS: CentOS Stream 9 container

PHP: 8.2.12

PostgreSQL: 15.2

Steps to reproduce

  1. Use PostgreSQL as a database, create the table hm_user_settings
  2. Login to the Cypht interface using IMAP authentication and full email address
  3. Change any user settings
  4. Try to save them permanently

ivanov17 avatar Nov 03 '23 14:11 ivanov17