Roundcube "File upload failed."

Discussion in 'ISPConfig 3 Priority Support' started by monnoliv, Jul 2, 2014.

  1. monnoliv

    monnoliv New Member HowtoForge Supporter

    Hello,

    (I'm posting after several hours of fruitless digging)

    I'm using ISPConfi3 (3.0.5.4p1 on Debian Wheezy with Apache, Postfix) with RoundCube. I've installed RoundCube following the tutorial "Using RoundCube Webmail With ISPConfig 3 On Debian Wheezy (Apache2)"
    My server is a mail server, I've only a website on it called tls.xxx.com that serves as the entry for the rouncube webmail (redirection on tls.xxx.com/webmail).
    Everything goes fine but it is not possible for any user to upload files ("File upload failed.") nor to upload a (100kb) image for the contacts ("The uploaded file exceeds the maximum size of 20MB.").
    Here are my test:
    - Ok, the temp/ directory is writable (chmod 777)
    - I put absolute path for the log and temp dir on the main.inc.php:
    $rcmail_config['log_dir'] = '/var/lib/roundcube/logs/';
    $rcmail_config['temp_dir'] = '/var/lib/roundcube/temp/';

    - I've checked the logs files of apache and php and I don't see something relevant (for me)

    Here is the content of the /etc/roundcube/htaccess file:

    Code:
    # AddDefaultCharset	UTF-8
    AddType text/x-component .htc
    
    <IfModule mod_php5.c>
    php_flag	display_errors	Off
    php_flag	log_errors	On
    # php_value	error_log	logs/errors
    
    php_value	upload_max_filesize	20M
    php_value	post_max_size		20M
    php_value	memory_limit		128M
    
    php_flag	zlib.output_compression		Off
    php_flag	magic_quotes_gpc		Off
    php_flag	magic_quotes_runtime		Off
    php_flag	zend.ze1_compatibility_mode	Off
    php_flag 	suhosin.session.encrypt 	Off
    
    #php_value	session.cookie_path		/
    php_flag	session.auto_start	Off
    php_value	session.gc_maxlifetime	21600
    php_value	session.gc_divisor	500
    php_value	session.gc_probability	1
    
    # http://bugs.php.net/bug.php?id=30766
    php_value	mbstring.func_overload	0
    </IfModule>
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^favicon.ico$ skins/default/images/favicon.ico
    # security rules
    RewriteRule .svn/ - [F]
    RewriteRule ^README|INSTALL|LICENSE|SQL|bin|CHANGELOG$ - [F]
    </IfModule>
    
    <IfModule mod_deflate.c>
    SetOutputFilter DEFLATE
    </IfModule>
    
    <IfModule mod_headers.c>
    # replace 'append' with 'merge' for Apache version 2.2.9 and later
    #Header append Cache-Control public env=!NO_CACHE
    </IfModule>
    
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 1 month"
    </IfModule>
    
    FileETag MTime Size
    
    <IfModule mod_autoindex.c>
    Options -Indexes
    </ifModule>
    Here is the content of the /etc/roundcube/apache.conf file:

    Code:
    # Those aliases do not work properly with several hosts on your apache server
    # Uncomment them to use it or adapt them to your configuration
    Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
    Alias /roundcube /var/lib/roundcube
    Alias /webmail /var/lib/roundcube
    # Access to tinymce files
    <Directory "/usr/share/tinymce/www/">
          Options Indexes MultiViews FollowSymLinks
          AllowOverride None
          Order allow,deny
          allow from all
    </Directory>
    
    <Directory /var/lib/roundcube/>
      Options +FollowSymLinks
      DirectoryIndex index.php
    
      <IfModule mod_php5.c>
        AddType application/x-httpd-php .php
        php_flag magic_quotes_gpc Off
        php_flag track_vars On
        php_flag register_globals Off
        php_value include_path .:/usr/share/php
      </IfModule>
    
      # This is needed to parse /var/lib/roundcube/.htaccess. See its
      # content before setting AllowOverride to None.
      AllowOverride All
      order allow,deny
      allow from all
    </Directory>
    
    # Protecting basic directories:
    <Directory /var/lib/roundcube/config>
            Options -FollowSymLinks
            AllowOverride None
    </Directory>
    
    <Directory /var/lib/roundcube/temp>
            Options -FollowSymLinks
            AllowOverride None
    	Order allow,deny
    	Deny from all
    </Directory>
    
    <Directory /var/lib/roundcube/logs>
            Options -FollowSymLinks
            AllowOverride None
    	Order allow,deny
    	Deny from all
    </Directory>
    The access on the webmail is made via https only.
    May I have some help?

    Regards,

    Olivier
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Add a info.php file with the content:

    <?php
    phpinfo();
    ?>

    in the folder /var/lib/roundcube/

    then open the file in your browser with http://tls.xxx.tld/webmail/info.php

    and check in the output which php mode is used to execute the script and which file upload limit is shown there.
     
  3. monnoliv

    monnoliv New Member HowtoForge Supporter

    Hi Till,

    Ty for reply

    phpinfo says it is the file:
    Code:
    /etc/php5/apache2/php.ini 
    Part of it:
    Code:
    post_max_size = 20M
    I tried aslo to turn On the display error:
    Code:
    display_errors = On
    then restart Apache, but no error is displayed when posting file ...

    Olivier
     
  4. monnoliv

    monnoliv New Member HowtoForge Supporter

    Hi Till,

    I'm sorry, I found the problem. The partition was full (used also by another prg), deleting some files solves the issue.

    Ty,

    Olivier

    NB: By the way, it's strange that no text was found in the log files
     

Share This Page