HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Webmail not working - ISPConfig 3 (http://www.howtoforge.com/forums/showthread.php?t=38926)

FadeOUT 8th September 2009 01:19

Webmail not working - ISPConfig 3
 
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..?

ivomendonca 8th September 2009 19:12

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/

FadeOUT 9th September 2009 16:44

Quote:

Originally Posted by ivomendonca (Post 203695)
apt-get remove --purge squirrelmail
apt-get install squirrelmail
cd /usr/share/squirrelmail
./configure

and add a link pointing to /var/www/webmail/

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

ivomendonca 9th September 2009 17:12

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-se...-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.

FadeOUT 9th September 2009 17:31

Quote:

Originally Posted by ivomendonca (Post 203811)
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-se...-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.

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.

ivomendonca 9th September 2009 17:40

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

FadeOUT 10th September 2009 13:26

Quote:

Originally Posted by ivomendonca (Post 203820)
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

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

FadeOUT 17th September 2009 13:18

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.

FadeOUT 29th September 2009 17:24

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.

FadeOUT 13th October 2009 12:39

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/+s...hp/+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).


All times are GMT +2. The time now is 03:36.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.