Using Amazon S3 to Store Django Static and Media Files

Great article about using Amazon S3 to store Django static and media files.

Here's how: Using Amazon S3 to store your Django sites static and media files.

./M6

Joomla Forum Post Assistant

While trying to find the problem on an old Joomla 2.5.11 website that had suddenly stopped working correctly, I found The Joomla Forum Post Assistant, shortened to (FPA), a nice and simple tool that helps one to detect possible problems on Joomla installations.

It's quite easy to use, just grab the latest version and uploaded it to your website, call it from the browser and that's it. Don't forget to remove it after you're done with it.

./M6

Installing Yii2 via Composer

Installing Yii2 via Composer is not hard. Currently, the stable version available is 2.0.6.
Here's how to really do it, the easy way:
sudo apt-get install composer
composer global require "fxp/composer-asset-plugin:~1.1.1"

For installing the basic version of the framework:
composer create-project yiisoft/yii2-app-advanced mywebsite 2.0.6

For installing the advanced version of the framework:
composer create-project yiisoft/yii2-app-advanced mywebsite 2.0.6

You will require a GitHub token, which requires an account, but it's an easy an straightforward step.

./M6

Video Conversionn with ffmpeg

While searching for how to convert a2v video into a mov, I found everything that one wanted to know about ffmpeg but was afraid to ask explained in a simple way in here: this forum answer.

In short, just do

ffmpeg -format
to list all formats. Then use this simple command to convert between video formats:
ffmpeg -i {input_video_file} -f {format} {ouput_video_file}
In my case, my command was:
ffmpeg -i Passadeiras\ Ativas.m2v -an -f mov teste.mov
since I was converting to a mov file and stripping the sound.

./M6

Could not close zip file php://output.

Ever got a "Could not close zip file" when using PHPExcel Writer? Usually the full error message is something like
[exception.PHPExcel_Writer_Exception] exception 'PHPExcel_Writer_Exception' 
with message 'Could not close zip file php://output.' 
in /var/www/vhosts/yourdomain/phpexcel/Classes/PHPExcel/Writer/Excel2007.php:399

This is caused because the PHPExcel requires access to the /tmp directory but the apache configuration is not allowing it.

The solution is easy and fast, just add the /tmp to your php_admin_value open_basedir parameter, as in this example:
php_admin_value open_basedir "[your current paths]:/tmp"

When using EHCP, it is recommended to update the Virtualhost configuration in all your templates (apachetemplate, apachetemplate_ipbased, apache_subdomain_template, apache_subdomain_template_ipbased) located in /var/www/new/ehcp:
php_admin_value open_basedir "{homedir}:/usr/share/php:/usr/share/pear:/tmp"

./M6