Get EasyTable Pro !

Get a Subscription for EasyTable Pro!
(
The current version is emailed to you when your subscription is payed.
Existing Subscribers can download here

Saturday May 19 , 2012
Font Size
   

Problems uploading files or installing extensions/templates

Out of Memory when Processing Files?

When PHP runs out of memory while running a large application ( like a CMS with lots of bells and whistles in a dynamic template ) you will see errors with the key phrases "Fatal Error" and "Allowed memory size of XXXXXX bytes exhausted".

Contributing causes include:

  • a comparatively low memory_limit setting compared to the work you're asking the server to do.
    • 64M is considered normal for dynamic eCommerce and CMS driven websites
  • asking the server to process/unzip/compress a very large file
  • over-loading your CMS/eCommerce/Web App with lots of extensions

The easiest solution is to increase PHP's memory_limit - depending on your hosting environment there are a variety of ways to do this - click here for a Google Search to get you started. If you have no idea how to do this the best solution will be to talk to your website provider.

File Uploads

Ok, first up file uploads for those that aren't clear are the following sorts of things:

  • adding a picture on your computer to an aritcle (you upload the image file)
  • installing a new component/plug-in/temple (these items are uploaded to your website)
  • uploading data to a custom component (like PDF & JPGs to Flipbook or CSV files for use in EasyTable)

A file upload is literally the transmission of data from your computer to the web server that your website runs on.

Unlike normal activities like editing text or creating menus which send small amount of data to specific fields, file uploads send much larger amounts of data in a pre-packaged format.  Files that can be uploaded can be a variety of types, common ones include:

  • ZIP/GZ  (compressed data files)
  • JPG/PNG/GIF (images)
  • SWF, AVI, MOV, MP3, MP4 (Flash, audio & video)

As file uploads are usually self contained packages they have to be treated with much more care. As such hosting services and most CMS software have limits on what can be uploaded. Some file restrictions that you might encouter include:

  • no executable files
    • to prevent virus transmission
  • no script files
    • like PHP
    • Perl etc
    • done to prevent hacking of the website
  • no files over a specified size
    • typically ranges from 0Mb to a user configurable number
    • usually the better the host the bigger you can go

Generally the one that causes the most trouble with a CMS website is the maximum file size you're allowed to upload. In Joomla this is controlled by a PHP variable called upload_max_filesize.

The value this variable has is usually controlled by your hosting service at the cheap end of town and by yourself in the nicer hosting services.

What's my upload_max_filesize?

The default PHP value is 2M (2 megabytes), most hosting providers change it from this either up or down. There are a variety of ways to find your websites value:

  • on WHM/CPanel system
    • Open the PHP Configuration icon PHP Configuration button in CPanel and look for the line highlighted in image below.
  • on Joomla 1.5
    • Select the menu "Help" -> "System Info" -> "PHP Information"
    • Scroll down to the end of the PHP Core section to find the value of upload_max_filesize
  • using a test PHP file
    • create and upload a phpinfo() file to your server (if you don't know what this means don't do it)
  • contact your hosting provider

PHP_Configuration

How can I change my upload_max_filesize?

There are a range of ways including using your WHM access to change it, setting a php.ini file up and finally calling your hosting provider. We recommend you read about it because you can cause problems if you do it the wrong way.

Please beaware the changing your upload_max_filesizecan cause problems if you make it greater than or equal to your post_max_size (another PHP setting). Apart from the file you're uploading you need to allow room for the other form elements, so the size of the file + the size of other form elements (text fields, drop down items, selection boxes etc) must be less than your post_max_size.

As a starting point here's a Google search for you.

 

RSForm! Pro by RSJoomla!


RSForm!Pro is a powerful Joomla! form creator, helping you to create custom forms in minutes. The new product makes form management much easier and gives you the time to handle your clients better.

For only €19.00 how can you go wrong?
 ( We've used it for years... Shouldn't you? )

Member Login