Hello, Guest.

  • Home
  • Docs
  • System Requirement for Photo Upload

System Requirement for Photo Upload

Contents

Picture Upload Feature

JomSocial relies heavily on GD Library to process images (resizing, creating copies, on-the-fly image manipulations). However on certain server conditions, GD Library might use a lot of memory to process each picture. This is especially true if you allow large photo uploads (2Mb+). If your server supports ImageMagick, or your php setup is compiled with ImageMagick, kindly use this option instead for better performance and image quality.

Required PHP Extension

  1. GD library (at least v1.8 with libjpeg), to process images.

Related Directories

  1. images
  2. images/avatar
  3. images/photos
  4. images/originalphotos

Large Photo Uploads

php.ini Tweaks

When it comes to large photo/video uploads, there are a few inter-related php.ini configurations that you will have to tweak in order to avoid timeout errors.
Those are:

max_execution_time = 9000 ; Maximum execution time of each script, in seconds
max_input_time = 9000 ; Maximum amount of time each script may spend parsing request data
memory_limit = 1024M ; Maximum amount of memory a script may consume
post_max_size = 1024M ; Maximum size of POST data that PHP will accept.
upload_max_filesize = 1024M ; Maximum allowed size for uploaded files.

(9000 and 1024M as an example).

my.cnf Tweaks

Increase

wait_timeout = 120
connect_timeout = 120

(120 seconds an example).

Disable safe mode & Openbase_dir

Some hosting providers have openbase_dir and safe mode enabled. In order for the photo upload / video conversion to work, you have to disable them. If your hosting allows you to override the Apache's configuration, you need to override the vhost configuration.

<Directory /home/yourdomain/public_html/>
php_admin_flag safe_mode off
php_admin_value open_basedir none
</Directory>

If your webhost allows for .htaccess override, locate your .htaccess file in the root Joomla directory and add these lines into it

php_admin_flag safe_mode off
php_admin_value open_basedir none

Docs Navigation

Slashes & Dots Sdn. Bhd.
MALAYSIA OFFICE
No 1-7, Signature Office,
The Boulevard Mid Valley City,
Lingkaran Syed Putra,
59200 Kuala Lumpur, Malaysia.
U.S. OFFICE
251 West Central Avenue #146,
Springboro, Ohio 45066, U.S.A.

Copyright © 2007 - 2010 JomSocial.com. All rights reserved.
JomSocial is made for Joomla!
JomSocial Community Count

1444 users currently online | 112571 forum posts