Web |
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
- GD library (at least v1.8 with libjpeg), to process images.
Related Directories
- images
- images/avatar
- images/photos
- 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

