Squirrelmail error

Discussion in 'Tips/Tricks/Mods' started by martinfst, Dec 18, 2006.

  1. martinfst

    martinfst Member Moderator

    Using ISPConfig 2.2.9 and the "official" Squirrelmail that can be downloaded as a package which gives Squirrelmail 1.5.1.

    Viewing a message through the Squirrelmail interface show me the message, but also gives me an error box with:
    Code:
    Message:   preg_split() expects parameter 4 to be long, string given
    FILE: 	   /home/admispconfig/ispconfig/web/squirrelmail/functions/imap_messages.php
    LINE: 	   926
    Category:  PHP
    Message:   Invalid argument supplied for foreach()
    FILE: 	   /home/admispconfig/ispconfig/web/squirrelmail/functions/mime.php
    LINE:  	   52
    Any seen this before? And knows a solution? It doesn't crash, it's just annoing to have an error.
     
  2. Bailx

    Bailx New Member

    i have the same error message, and i can receive email, but not send it successfully via squirrelmail (or roundcube).

    would you mind testing to see if you can send an email (to an email address on a diff. server).
     
  3. martinfst

    martinfst Member Moderator

    I'd like to, but I reconfigured couple of things and currently it's not working and I have mtgs all day, so this has to wait till tomorrow for me
     
  4. falko

    falko Super Moderator Howtoforge Staff

    You can try to find out what's happening in line 926 in /home/admispconfig/ispconfig/web/squirrelmail/functions/imap_messages.php
    and line 52 in /home/admispconfig/ispconfig/web/squirrelmail/functions/mime.php. Maybe that gives you some hints.
     
  5. z33k3r

    z33k3r New Member

    Code:
    Message:   preg_split() expects parameter 4 to be long, string given
    FILE: 	   /home/admispconfig/ispconfig/web/squirrelmail/functions/imap_messages.php
    LINE: 	   926
    Category:  PHP
    This is caused by a typo in the imap.messages.php file.
    Code:
     $flags = preg_split('/ /', $regs[1],-1,'PREG_SPLIT_NI_EMPTY');
    
    ...needs to be this:
    
     $flags = preg_split('/ /', $regs[1],-1,'PREG_SPLIT_NO_EMPTY');
    I am currently looking into the second error as I am experiencing the same...
     
  6. mtuser

    mtuser New Member

    You need to change Display Preference before sending any email.
    squirrelmail - change Personal Information
    roundcube - change Personal settings>Identities

    imap_messages.php 926
    Code:
     $flags = preg_split('/ /', $regs[1],-1,'PREG_SPLIT_NI_EMPTY');
    
    mimi.php 52
    Code:
       foreach ($flags as $flag) {
    
    I've got same problem
    ISPConfig 2.2.9
    squirrelmail.pkg from download page
     
    Last edited: Jan 7, 2007
  7. z33k3r

    z33k3r New Member

    I switched to SquirrelOutlook (very nice) and these errors have gone away... I will look later today to see if I can figure out what the difference is in both these files...
     
  8. wrender

    wrender New Member

    Same problems.

    I'm having the same problems. Even after editing imap_messages.php as recommended above. Just going to try out squirrelOutlook now...

    Wes
     
  9. Fitti

    Fitti New Member

    bug fix

    the correct line is :

    Code:
    $flags = preg_split('/ /', $regs[1],-1,PREG_SPLIT_NO_EMPTY);
     
  10. bitonw

    bitonw New Member

    after i made your change (fix) it all works! thank you very much.
     
  11. cryptic

    cryptic Member

    When will this typo be fixed? Still seeing this behavior and typo in 2.2.13
     

Share This Page