HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   Squirrelmail downloads file... (http://www.howtoforge.com/forums/showthread.php?t=52042)

vibrancy 26th March 2011 20:33

Squirrelmail downloads file...
 
Main hard drive on my server crashed the other day, so finally get to upgrade to Debian 6 and ISPConfig3 - i'm excited!

Spent most of yesterday fiddling around and getting acclimated to the new system and I had pretty much everything working flawlessly. I was able to send/receive e-mails no problem, access websites, etc...

Today though, nothing has changed mind you... now when I try to access my webmail it downloads a file instead of going to the site. Absolutely no settings have been changed manually... so what is going on here?

www.digitalvibrance.com/webmail

You can see what I mean... any help would be greatly appreciated!

---------------------------
Edit:
Found another thread mentioning the same issue, although his resolution was just simply reinstalling everything, which is not a great solution =\

I did make sure PHP is enabled for the site, have tried a few different settings all to no avail, tried FAST-cgi, mod-PHP, and suPHP but none worked, also checked permissions and "chmod 770 /var/lib/squirrelmail/data/" but nothing again... same result regardless of entering ip address vs domain name...

falko 27th March 2011 20:23

Can you post the vhost confoguration of the www.digitalvibrance.com vhost?

What's the output of
Code:

ls -la
in the document root of the www.digitalvibrance.com web site?

Ovidiu 14th April 2011 11:11

exactly the same problem here. test it here: http://zice.ro/webmail
file gets downloaded and the content of that file says:

Code:

<?php

/**
 * index.php
 *
 * Redirects to the login page.
 *
 * @copyright 1999-2010 The SquirrelMail Project Team
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 * @version $Id: index.php 13893 2010-01-25 02:47:41Z pdontthink $
 * @package squirrelmail
 */

// Are we configured yet?
if( ! file_exists ( 'config/config.php' ) ) {
    echo '<html><body><p><strong>ERROR:</strong> Config file ' .
        '&quot;<tt>config/config.php</tt>&quot; not found. You need to ' .
        'configure SquirrelMail before you can use it.</p></body></html>';
    exit;
}

// If we are, go ahead to the login page.
header('Location: src/login.php');

?>

but the webmail can perfectly fine be accessed via: https://h1870666.stratoserver.net:8080/webmail/

the vhost of zice.ro is:

Code:

<Directory /var/www/zice.ro>
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>

<VirtualHost *:80>
      DocumentRoot /var/www/zice.ro/web

    ServerName zice.ro
    ServerAlias *.zice.ro
    ServerAlias *.zice.md zice.md
    ServerAlias fisiere.zice.ro
    ServerAdmin webmaster@zice.ro

    ErrorLog /var/log/ispconfig/httpd/zice.ro/error.log


    <Directory /var/www/zice.ro/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/www/clients/client1/web1/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>


    # suexec enabled
    SuexecUserGroup web1 client1
    # Clear PHP settings of this website
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler None
    </FilesMatch>
    # php as fast-cgi enabled
    <IfModule mod_fcgid.c>

          # SocketPath /tmp/fcgid_sock/

          # IdleTimeout n (3600 seconds)
          # An idle fastcgi application will be terminated after IdleTimeout seconds.
      IdleTimeout 3600

          # ProcessLifeTime n (7200 seconds)
      # A fastcgi application will be terminated if lifetime expired, even no error is detected.
      ProcessLifeTime 7200

          # MaxProcessCount n (1000)
      # The max count of total fastcgi process count.
      # MaxProcessCount 1000

          # DefaultMinClassProcessCount n (3)
      # The minimum number of fastcgi application instances for any one fastcgi application.
      # Idle fastcgi will not be killed if their count is less than n
      # Set this to 0, and tweak IdleTimeout
          DefaultMinClassProcessCount 0

          # DefaultMaxClassProcessCount n (100)
      # The maximum number of fastcgi application instances allowed to run for
      # particular one fastcgi application.
      DefaultMaxClassProcessCount 100

          # IPCConnectTimeout n (3 seconds)
      # The connect timeout to a fastcgi application.
      IPCConnectTimeout 8

          # IPCCommTimeout n (20 seconds)
      # The communication timeout to a fastcgi application. Please increase this
      # value if your CGI have a slow initialization or slow respond.
      IPCCommTimeout 360

          # BusyTimeout n (300 seconds)
      # A fastcgi application will be terminated if handing a single request
      # longer than busy timeout.
          BusyTimeout 300

    </IfModule>
    <Directory /var/www/zice.ro/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
        <Directory /var/www/clients/client1/web1/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

    RewriteEngine on
    RewriteCond %{HTTP_HOST}  ^fisiere.zice.ro [NC]
    RewriteRule  ^/(.*)$ /fisiere/$1  [L]

    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
      AssignUserId web1 client1
    </IfModule>

    <IfModule mod_dav_fs.c>
      # DO NOT REMOVE THE COMMENTS!
      # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
      # WEBDAV END
    </IfModule>
<IfModule mod_fcgid.c>
  IPCConnectTimeout 300
  IPCCommTimeout 360
  MaxRequestLen 16777216
</IfModule>
</VirtualHost>

and the ls -al of the root web folder is too long to post here, what specifically are you looking for?

btw. I followed this howto: http://www.howtoforge.com/enabling-s...r-ubuntu-10.10

maybe this info helps:

Code:

h1870666:/etc/squirrelmail# ls -al
total 80
drwxr-xr-x  2 root root  4096 Apr 14 10:57 .
drwxr-xr-x 108 root root  4096 Apr 14 10:35 ..
-rw-r--r--  1 root root  1145 Mar  6 18:52 apache.conf
lrwxrwxrwx  1 root root    7 Apr 14 10:57 config -> config/
-rw-r--r--  1 root root 31242 Jul 31  2010 config_default.php
-rw-r--r--  1 root root  459 Jul 31  2010 config_local.php
-rw-r--r--  1 root root  8401 Mar  6 18:44 config.php
lrwxrwxrwx  1 root root    32 Mar  6 18:43 conf.pl -> /usr/sbin/squirrelmail-configure
-rw-r--r--  1 root root    41 Jul 31  2010 default_pref
-rw-r--r--  1 root root  6583 Jul 31  2010 filters_setup.php
-rw-r--r--  1 root root  478 Jul 31  2010 index.php
-rw-r--r--  1 root root  1654 Jul 31  2010 sqspell_config.php
h1870666:/etc/squirrelmail# cd config
bash: cd: config: Too many levels of symbolic links
h1870666:/etc/squirrelmail#

oh and I do have added the right entries /user/share/squirelmail and /etc/squirrelmail to my php_open_base_dir variable.
also fixed the above symlinks problem by removing and re-installing squirrelmail according to the ispcfg3 tutorial..

falko 15th April 2011 14:01

Does it work with mod_php?

Ovidiu 16th April 2011 00:11

how would I test that? The squirrelmail config file for apache loads as an alias for all sites...
I don't want to set all my sites to mod_php :-)

I have set one site to mod_php, waited for the changes to be saved to file and tried: still the same result...

Ovidiu 21st April 2011 14:42

any other ideas?

Ovidiu 12th May 2011 14:17

nothing? sorry for bumping again, will just leave it be if I don't get an answer this time :-(

erosbk 12th May 2011 20:44

AddHandler application /x-httpd-php .php .php3 .php4 .php5

You have to add that line in the conf file of squirrelmail (for roundcube, I used an htaccess file in program folder.)

That line force squirrelmail to use php_mod instead of xxx_mod configured in your virtual sites.

till 13th May 2011 09:55

Another solution is to edit the file:

/etc/apache2/mods-enabled/suphp.conf

and change the lines:

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

to:

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

and then restart apache.

Ovidiu 13th May 2011 15:55

didn't work, any other ideas or did I do anything wrong?

here is my squirrelmail conf file:


Alias /webmail /usr/share/squirrelmail

<Directory /usr/share/squirrelmail>
AddHandler application /x-httpd-php .php .php3 .php4 .php5
Options FollowSymLinks
<IfModule mod_php5.c>
php_flag register_globals off
</IfModule>
<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>

# access to configtest is limited by default to prevent information leak
<Files configtest.php>
order deny,allow
deny from all
allow from 127.0.0.1
</Files>
</Directory>
.
.
.


All times are GMT +2. The time now is 16:01.

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