Home · Links · Contact Us
Home arrow FAQ arrow Attachments arrow Attachment upload problems
Home
Features
FAQ
Screen Shots
Modules
Demos
Documentation
Forums
Contact Us
Download
Purchase
Quotes

" ... I want to tell you that your thyme product is functional and valuable beyond words. I cannot imagine why any portal would be without it. It is the cornerstone of our new project ..."

" ... Thanks for such a complete project, its making my job much easier. ..."

" ... I have now deployed 4 different calendars and our users love them ... "

" ... Easy to install and use and a great look/design. ..."

" ... This has to be the easiest to use program I think I've had to deal with at all this year. ..."


Attachment upload problems Print
Attachments
These problems include but are not limited to:
  • "Document contains no data" Error Message
  • File upload hangs indefinitely.
  • Status bar stops moving. Browser stops sending data.
  • "PHP Warning: POST Content-Length of x bytes exceeds the limit ..." in error logs

First check your web server's logs for any useful information. It may point you to the exact section you need review below.

The most common cause of this is PHP itself. The following php.ini settings effect file uploads
  • file_uploads

  • 1 to accept file uploads, 0 to not accept file uploads. Defaults to 1.

  • post_max_size

  • This is the maximum size of a POST request that PHP will accept. The default for PHP 4.3.x is 8M. If the file(s) you are trying to upload have a single or combined size over this value, PHP will exit. This affects the total post data. For example, if this were set to 8M and you are uploading four 3M files, PHP would not accept the files. You could, however, upload the four 3M files individually without a problem from this setting.

  • upload_max_filesize

  • This is the maximum size of an individual uploaded file. The default for PHP 4.3.x is 2M.

  • max_input_time

  • This is the maximum time PHP will accept input in seconds. The default for PHP 4.3.x is 60.

You may see all your current ini settings using the script included with Thyme, under the base directory, called phpinfo.php. Simply navigate to it in your web browser. This script will also tell you where your php.ini is located.

For more information see PHP's file upload documentation at http://www.php.net/manual/features.file-upload.common-pitfalls.php

If you do not have access to change php.ini and your website is running on apache, you may be able to include these settings in an .htaccess file. You will need "AllowOverride Options" or "AllowOverride All" privileges in httpd.conf to do so. Create or edit a file named '.htaccess' in Thyme's base directory and add the following to it (assuming you want a 5Mb max attachment size):
php_value post_max_size "6M"
php_value upload_max_filesize "5M"
php_value max_input_time "120"
For your convenience, Thyme includes htaccess-example in it's base directory. For more information see the PHP Settings section of this FAQ.

Note that you can not change the file_uploads setting in an .htaccess file.

If you do not have access to either of these, contact your hosting provider.



The second most common cause of these problems is your web server.

  • apache


  • Check for a LimitRequestBody setting. The setting for all PHP files is most likely in httpd.conf or php.conf in your apache configuration directory, however could be in any .conf file included by your apache installation. It may look something like this:
    #
    # Cause the PHP interpreter handle files with a .php extension.
    #
    <Files *.php>
       SetOutputFilter PHP
       SetInputFilter PHP
       LimitRequestBody 524288
    </Files>
    
    The value is the limit in bytes. The above sample would set the limit to 512kB. It is recommended you remove the line all together (or set it to 0) and let PHP handle this for itself. If you do not have access to edit your web server's configuration, some configurations allow you to use an htaccess file. You may set it to 0 by entering the following in an htaccess file:
    <Files *.php>
       LimitRequestBody 0
    </Files>
    
    .. and placing the file Thyme's base directory. For more information on using htaccess files see the apache documentation at http://httpd.apache.org/docs-project/.

  • IIS


  • If you have installed PHP as CGI, follow these instructions to set the timeout value:

    1. In the Internet Information Services snap-in, select the computer icon and open its property sheets.
    2. Under Master Properties, select WWW Service, and then click the Edit button
    3. Click the Home Directory tab.
    4. Click the Configuration button.
    5. Click the Process Options tab, and then type the timeout period in the CGI Script Timeout box.


If you are using MySQL AND storing attachments in your database:

You may have to set max_allowed_packet to a higher value. The default is 1Mb. It is recommended that you set this value 1Mb above the attachment size limit you have selected in Thyme's configuration.

To set it in my.cnf change the line:
set-variable    = max_allowed_packet=1M
under the [mysqld] section to your new value. If you want to allow 10Mb attachments, set it to '11M'. If this line does not exist under [mysqld], create it.

To set it as an argument passed at startup to MySQL, add the argument to the list of options passed to safe_mysqld in your mysql init script. The startup line may look something like this:
$bindir/safe_mysqld --datadir=$datadir
Change it to this:
$bindir/safe_mysqld --datadir=$datadir --max_allowed_packet=11M

 
It's all about you!
Does Thyme lack a feature you want? How may we improve it?

Buy Now
  • Secure Checkout
  • Simple, web-based installation
  • PayPal accepted

Test Drive
Download our free, 30-day trial version with no obligation to buy.

The trial download contains all the same features as the full version, so you know exactly what you're getting!

Latest Updates
© 2005 eXtrovert software unless otherwise noted. All rights reserved.
Portions © 2004 Ben Brown. All rights reserved.
Trademarks are property of their respective owners.