Author Topic: login failed request after roundcube move to new server  (Read 7151 times)

Offline boxyball

  • Full Member
  • ***
  • Posts: 92
login failed request after roundcube move to new server
« on: November 05, 2019, 09:53:01 AM »
Hello forum,
I just moved roundcube v1.1.4 to a new fedora 30 server roundcube v1.3.10
Most users seem to be ok, but one cannot log in due to the following:

FILE NOT FOUND
The requested resource was not found!
Please contact your server-administrator.
Failed request:
?_task=mail&_token=o4rfw6Z4RojaWTGRCibWexRj6qkyhk4X

I searched the session table and that sess_id is not listed.
How do I fix?

Thanks in advance.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Re: login failed request after roundcube move to new server
« Reply #1 on: November 05, 2019, 01:07:18 PM »
it sounds like you can see the login page ok but after you login you get the roundcube error screen rather than an http server error is that correct? if so it might be down to your skin config may be. is there anything in your roundcube error log? try adding 'skin' to 'dont_override' in your roundcube config
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline boxyball

  • Full Member
  • ***
  • Posts: 92
Re: login failed request after roundcube move to new server
« Reply #2 on: November 05, 2019, 01:29:42 PM »
I checked error log as instructed.  This is the error:

[05-Nov-2019 12:28:51 -0600]: <p5kjm43v> PHP Error: Error loading template for mail in /var/www/html/roundcube/program/include/rcmail_output_html.php on line 613 (GET /?_task=mail&_token=2ig8TBmiD3YAQbg43FNccNmV8xQvrXjo)

Also, I added this to the bottom of config.inc.php and the problem remains:

$config['dont_override'] = 'skin';

This problem only happens to a few users.
« Last Edit: November 05, 2019, 05:59:13 PM by boxyball »

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Re: login failed request after roundcube move to new server
« Reply #3 on: November 06, 2019, 03:07:39 AM »
all good information. I'm guessing you copied the users' settings from the old server and you have a slightly different setup on the new one.

This line: `$config['dont_override'] = 'skin';` should be `$config['dont_override'] = array('skin');`

assuming that solves it there is a script in the bin/ folder that ships with roundcube called moduserprefs.sh which you can use to repair the broken users' settings. details of how to use it are described at the top of the file.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline boxyball

  • Full Member
  • ***
  • Posts: 92
Re: login failed request after roundcube move to new server
« Reply #4 on: November 06, 2019, 10:50:47 AM »
Thanks.  I corrected the config as instructed and the problem is resolved.
However, I am unclear on how to use bin/moduserprefs.sh
The only instructions at the top are:
 Bulk-change settings stored in user preferences

Offline boxyball

  • Full Member
  • ***
  • Posts: 92
Re: login failed request after roundcube move to new server
« Reply #5 on: November 07, 2019, 12:08:26 PM »
Can anyone help with instructions for moduserprefs?
I searched the Internet and there is very little out there.
I could find no instructions and a few cases where it was used by someone who already knew how to use it.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Re: login failed request after roundcube move to new server
« Reply #6 on: November 08, 2019, 12:57:30 PM »
from your bash prompt you need to navigate into your roundcube directory and then you can run the command like this for example:
Code: [Select]
bin/moduserprefs.sh --delete skinif you run
Code: [Select]
bin/moduserprefs.sh it will print out the usage information:
Code: [Select]
Usage: moduserprefs.sh [options] pref-name [pref-value]
Options:
    --user=user-id User ID in local database
    --config=path  Location of additional configuration file
    --delete       Unset the given preference
    --type=type    Pref-value type: int, bool, string
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline boxyball

  • Full Member
  • ***
  • Posts: 92
Re: login failed request after roundcube move to new server
« Reply #7 on: November 08, 2019, 01:55:57 PM »
Thanks!  That worked.  Is there a list of the preferences somewhere?

Oops.  I noticed that one of the five users I ran the moduserprefs on still has the skin setting.
I looked at her preferences in the database and notice she has a three line signature with return/line feeds in it.
Could that be the cause?
How would I fix that one?
« Last Edit: November 08, 2019, 02:04:02 PM by boxyball »

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Re: login failed request after roundcube move to new server
« Reply #8 on: November 09, 2019, 03:41:05 AM »
Quote
Oops.  I noticed that one of the five users I ran the moduserprefs on still has the skin setting.
I looked at her preferences in the database and notice she has a three line signature with return/line feeds in it.
That doesn't sound right. Email signatures are stored in the identities table not in the preferences field of the users table. The contents of the preferences field is a serialized array.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline boxyball

  • Full Member
  • ***
  • Posts: 92
Re: login failed request after roundcube move to new server
« Reply #9 on: November 09, 2019, 06:53:11 PM »
I would paste it in here but it has a ton of names in it.
the field I mentioned is s:49 which seems like it might be part of compose_responses.

What if I copied the entire preferences contents into a text editor, and changed the word Larry to classic?
Then inserted the contents back into the users table.
Would that be a work around or is there a better way?

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Re: login failed request after roundcube move to new server
« Reply #10 on: November 10, 2019, 03:05:56 AM »
canned_responses. that makes sense and should not cause any problem. When you run the moduserprefs script what does the output say for that user? it should be something like "Updating prefs for user 4...saved." where the number is the user id from the database.

You can edit the string manually but you need to be very careful. you can remove the entire section that looks like `s:4:"skin";s:5:"larry";` and change the `a:[number]` to one less. And ofc take a backup before you do it just in case. But if there is something else wrong with this user then editing manually is not really going to help.

Do you know PHP may be trying some investigation inside program/include/rcmail_utils.php::mod_pref()
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline boxyball

  • Full Member
  • ***
  • Posts: 92
Re: login failed request after roundcube move to new server
« Reply #11 on: November 10, 2019, 01:42:36 PM »
I checked again and now the skin setting is gone.
Maybe it was cleaned by the nightly cleandb.

I must have screwed something up on this last install because the option to choose skins is no longer visible.
What makes the option visible/not visible?

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Re: login failed request after roundcube move to new server
« Reply #12 on: November 11, 2019, 05:23:06 AM »
a couple of things it could be

1) do you still have `skin` set in your `dont_override` config? because that will hide the option.
2) looking back through this thread you say you are running 1.3.10 and that the user had "larry" in their config. Larry is the default skin in 1.3 so that should not have caused any problems. Have a look in the folder <rc roo>/skins/ you should have 2 folders there "classic" and "larry" and make sure they have the same permissions etc.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline boxyball

  • Full Member
  • ***
  • Posts: 92
Re: login failed request after roundcube move to new server
« Reply #13 on: November 11, 2019, 09:49:38 AM »
Thanks!  All fixed.
Removing ...
$config['dont_override'] = array('skin');
... fixed everything.