Webmail not working - ISPConfig 3

Discussion in 'Installation/Configuration' started by FadeOUT, Sep 8, 2009.

  1. FadeOUT

    FadeOUT New Member

    Hi,

    Although it originally worked, after running some updates, Squirrelmail no longer works (giving a 500 error). Since then, I have downloaded and installed the latest version of ISPConfig, but this has not affected the situation.

    The Apache log shows the following when I attempt to access the webmail directory:
    • SoftException in Application.cpp:202: Script "/var/www/webmail/index.php" resolving to "/usr/share/squirrelmail//index.php" not within configured docroot

    The installation is of ISPConfig 3 on Ubuntu 64bit using the Perfect Setup instructions. Webmail was originally working. It is installed within a VPS, but was working.

    If I copy the Squirrelmail to /var/www instead of using a symlink, I get these errors in the Apache logs, instead:

    • SecurityException in Application.cpp:440: Handler not found in configuration
    • Caused by KeyNotFoundException in Configuration.cpp:234: Handler "application/x-httpd-php" not found

    Any ideas... please..?
     
  2. ivomendonca

    ivomendonca Banned

    Try to reinstall.

    apt-get remove --purge squirrelmail
    apt-get install squirrelmail
    cd /usr/share/squirrelmail
    ./configure

    and add a link pointing to /var/www/webmail/
     
  3. FadeOUT

    FadeOUT New Member

    Thanks... Worth a try, but I'm still getting the same error.
     
  4. ivomendonca

    ivomendonca Banned

    This is not the normal procedure to do this.

    If I copy the Squirrelmail to /var/www instead of using a symlink, I get these errors in the Apache logs, instead:

    * SecurityException in Application.cpp:440: Handler not found in configuration
    * Caused by KeyNotFoundException in Configuration.cpp:234: Handler "application/x-httpd-php" not found


    If you remove and delete Squirrelmail files manualy, and install normaly as you shoud, this will work, dont do crazy stuff and ask help from there.

    The better way is allways the clean and normal way.

    http://www.howtoforge.org/perfect-server-debian-lenny-ispconfig3-p5 this "way" works even when updating.


    Personaly Ubunto is for workstations and normal Debian is for servers maybe is that your first problem.

    by.
     
    Last edited: Sep 9, 2009
  5. FadeOUT

    FadeOUT New Member

    I didn't think that copying it would actually be useful functionally, but just might be some kind of guide as to the problem (I was wondering if suphp was broken for some reason). It's interesting that you got the same error - that presumably rules suphp out of the equation.

    Anyway, yes, I removed / purged everything and reinstalled as in the Perfect Setup and it still didn't work - thanks for the idea, though.
     
  6. ivomendonca

    ivomendonca Banned

    Do you have this line ok?

    My last tip :)

    /etc/apache2/conf.d# nano apache2-doc

    Alias /webmail /usr/share/squirrelmail/

    <Directory "/usr/share/squirrelmail/">
    Options Indexes FollowSymlinks
    AllowOverride None
    Order allow,deny
    Allow from all
    AddDefaultCharset off
    </Directory>

    Suphp is the problem, ok good luck resolving
     
    Last edited: Sep 9, 2009
  7. FadeOUT

    FadeOUT New Member

    That didn't work, either - the browser then offers up a phtml page for download. Thank you, anyway.
     
  8. FadeOUT

    FadeOUT New Member

    OK, I tried a much simpler test; I put a simple "test.php" page in /var/www and still got a 500 error with the following reported in the apache2 log:
    • KeyNotFoundException in Configuration.cpp:234: Handler "application/x-httpd-php" not found

    I presume that this is a simple config file issue - I'll try and track down where the issue is. If anyone familiar with ISPConfig / The Perfect Setup wants to chuck me a pointer in the right direction that would be appreciated - most of what I've tried so far hasn't helped.
     
  9. FadeOUT

    FadeOUT New Member

    I finally got this working, the main change being to /etc/apache2/mods-available/suphp.conf:

    OLD:

    AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml
    suPHP_AddHandler application/x-httpd-php

    NEW:

    AddType x-httpd-php .php .php3 .php4 .php5 .phtml
    suPHP_AddHandler x-httpd-php

    The only remaining problem is a constant stream in the apache log of:
    [warn] Cannot get media type from 'x-httpd-php'

    I might resort to installing ISPConfig on another machine somewhere just to be able to check the .conf files to figure out what got screwed up.
     
  10. FadeOUT

    FadeOUT New Member

    Solved..!

    I must have read but missed the answer repeatedly, it's available here, for anyone who has the same problem:

    https://bugs.launchpad.net/debian/+source/suphp/+bug/253268

    This problem can be fixed (at least in Jaunty) by changing "application/x-httpd-php" to "application/x-httpd-suphp" in {/etc/suphp/,/etc/apache2/mods-available/}suphp.conf. This solution was described in Debian bugreport #519005.

    Make sure that you restart Apache afterwards (/etc/init.d/apache2 restart).
     

Share This Page