Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to permanently save account settings to the database #820

Closed
ivanov17 opened this issue Nov 3, 2023 · 5 comments
Closed

Unable to permanently save account settings to the database #820

ivanov17 opened this issue Nov 3, 2023 · 5 comments
Assignees

Comments

@ivanov17
Copy link

ivanov17 commented Nov 3, 2023

🐛 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 #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
@marclaporte
Copy link
Member

@Yannick243 PostgreSQL is not in our happy path, so please check if this has an incidence.

Virtualmin has built-in support for PostgreSQL so you can spin up a virtual machine for a quick test:
https://github.com/virtualmin/virtualmin-gpl/blob/master/create-database.pl

@marclaporte
Copy link
Member

Related: cypht-org/cypht-docker#11

@Yannick243
Copy link
Member

The new official Docker image #1001 has fixed PostgreSQL support. Additionally, in a non-Docker environment, settings are being saved correctly.

@marclaporte
Copy link
Member

@ivanov17 can we close?

@marclaporte
Copy link
Member

@ivanov17 Cypht 1.4.x doesn't support PHP 8.2 as per
https://github.com/cypht-org/cypht/wiki/Lifecycle

If the bug is present in Cypbt 2.4.0, please re-open this issue and we will fix
https://github.com/cypht-org/cypht/releases/tag/v2.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants