Roundcube Community Forum

 

Redirect error when clicking on "write new mail" icon

Started by Ninsuo, September 28, 2010, 10:23:09 AM

Previous topic - Next topic

Ninsuo

Hello,

I just installed RoundCube on my server, and I have a problem:

When I want to write a new mail, I get a Firefox error:

The page isn't redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

The most simple is an example:
Connect on my roundcube: Webmail d'Ocarina :-) :: Bienvenue sur Webmail d'Ocarina :-)
Use: [email protected] with pass: testtest

Try to create a new mail and.... see!

Do you know how to fix this bug?...

Thanks a lot!

Alain

SKaero

It looks like a session problem, is there any errors in your error log and what version of php are you running?

Ninsuo

Nop, there is no error message (there is errors but not because of this bug, tail -f does not show anything and time mismatch).

My PHP version is 5.2.6-1+lenny3

If you need more info, phpinfo()

Do you think I need to upgrade?

Hope you can help! RoundCube looks very nice.

SKaero

Your php version is fine and nothing pops out at me in your phpinfo. To debug in /program/steps/mail/compose.inc add:

if(isset($_GET['_id'])) {
die('<pre>'. print_r($_SESSION));
}

Before

if (!is_array($_SESSION['compose']) || $_SESSION['compose']['id'] != get_input_value('_id', RCUBE_INPUT_GET))

And post what it outputs when you go to compose an email.

Ninsuo

#4
Thank you.

Here is the source code of the page I get after doing that :

Array
(
   
  • =>
  • [language] => fr_FR
        [auth_time] => 1285703429
        [imap_root] => INBOX
        [imap_delimiter] => .
        [user_id] => 3
        [username] =>
[email protected]
    [imap_host] => localhost
    [imap_port] => 143
    [imap_ssl] =>
    [password] => [pass hash]
    [login_time] => 1285703429
    [timezone] => 2
    [task] => mail
    [request_tokens] => Array
        (
            [mail] => 60b5a9f3e9d542e245c68f6bcfac730d
        )

    [mbox] => INBOX
    [sort_col] =>
    [sort_order] => DESC
    [quota_display] => image
    [list_attrib] => Array
        (
            [name] => messages
            [id] => messagelist
            [cellspacing] => 0
            [columns] =>
            [summary] => Message list
            [messageicon] => /images/icons/dot.png
            [unreadicon] => /images/icons/unread.png
            [deletedicon] => /images/icons/deleted.png
            [repliedicon] => /images/icons/replied.png
            [forwardedicon] => /images/icons/forwarded.png
            [forwardedrepliedicon] => /images/icons/forwarded_replied.png
            [attachmenticon] => /images/icons/attachment.png
            [flaggedicon] => /images/icons/flagged.png
            [unflaggedicon] => /images/icons/blank.gif
            [unreadchildrenicon] =>
            [optionsmenuicon] => /images/icons/columnpicker.gif
        )

    [skin_path] => skins/default
    [unseen_count] =>
    [compose] =>
)
1
								

SKaero

So the session isn't being set right or is being removed. I recommend doing a upgrading or a fresh install of the SVN version because there has been some changes that may have fixed this. If the problem continues we wil need to do some more debugging. Also are you using any plugins?

Ninsuo

Nope, that's a simple install without plugins.

I install it again using SVN right now and let you know.

Thanks,

Alain

Ninsuo

I installed the snapshot version, and that's still not working...
Should I install the lastest version of PHP?
Is there any way to get a log with more debug messages?

Thanks,
Alain

SKaero

The version of php you are using is fine and I don't think any of the other debug options will help. Would you be willing to give me ftp access to to RoundCube so I can do some more testing?

Ninsuo

I send you a private message right now.

Thank you,

Alain

SKaero

After doing some more debugging I can tell that its a problem with how the session data is unserialize from the database but I am still working on finding the exact problem but I have narrowed it down to one function. I'll continue working on it tomorrow.

Ninsuo

Hello Skaero,

Did you found something? Do you need something else?

Thanks a lot!

Alain

Ninsuo

Ok, thanks again, if you need help let me know.

Alain

SKaero

I found the problem, its your sent mail folder that is titled "Mails envoyés" the "é" is breaking the array that is going into the database witch is removing the compose id making it go in a endless loop. I tried several different things to fix it but none of them worked, but I am not to good with dealing with special characters. It doesn't seem to be a RoundCube problem because it does work on my server. I fixed it temporarily by commenting out the line where it is set in <RC root>/program/steps/mail/compose.incThe line I commented out
$_SESSION['compose']['param']['sent_mbox'] = $RCMAIL->config->get('sent_mbox');However this means the "Save sent message in" option doesn't get set. I am not sure what else I can do, hopefully someone else has a better idea.

Ninsuo

The most simple is that I rename "Mails envoyés" by "Mails envoyes", that does not matter at all.

That's a strage bug, especially if RC is working on your server without a problem. My server is quite old and an update perhaps would solve the problem.

Thanks a lot for your support.

Alain