ModSecurity: Audit log: Failed to create subdirectories

I was getting the following error while creating a Cpanel WHM server with mod_ruid2 and mod_security2

[Wed Aug 10 21:11:49.156474 2016] [:error] [pid 7605] [client] ModSecurity: Audit log: Failed to create subdirectories: /etc/apache2/logs/modsec_audit/testuser/20160810/20160810-2111 (Permission denied) [hostname ""] [uri "/cgi-sys/ea-php56/index.php"] [unique_id "V6vJ9eGi@GFDguH4fJwHIgABABk"]

I found that disabling

EXPERIMENTAL: Jail Apache Virtual Hosts using mod_ruid2 and cPanel® jailshell.

resolved this issue

No Comments

Gentoo gcc recipe for target ‘s-attrtab’ failed

When updating to gcc-4.9.3 the build was failing with error

Makefile:2129: recipe for target 's-attrtab' failed

The internet was sparse on details, but as it turns out my virtual machine was running out of memory causing the build to crash.
By increasing the amount of memory from 512Mb to 1.5Gb, I was finally able to upgrade gcc.


AndroidAnnotations and Material Design App Bar/ActionBar

I was trying to get the material design App Bar/ActionBar/Toolbar working with an activity that uses AndroidAnnotations. I was following the tutorial here but I was finding that while the bar was rendering, it didn’t have any content.

It turns out the culprit was AndroidAnnotations which was overwriting the content view after the toolbar was bound to it in the onCreate method.

The solution is to add a method with an @AfterViews annotation that will be run after the views are bound. For example:

Toolbar toolbar;
protected void bindActionBar() {

1 Comment

PhpStorm 10 HHVM debugging

To enable command-line debugging for HHVM in PHPstorm 10 do the following:

  1. Add HHVM as an interpreter to PhpStorm (Settings->Language&Frameworks->PHP->Interpreter)
  2. Note the Xdebug port that is set in PhpStorm (Settings->Language&Frameworks->PHP->Debug)
  3. Make PhpStorm start listening for xdebug connections
  4. Place the following in your /etc/hhvm/php.ini file, ensuring the remote_port matches that set in PhpStorm:

No Comments

Install Composer in Ubuntu

Rather than adding a composer.phar file to each project it can be easier to install composer to your linux distribution’s bin folder.

#ensure php cli is installed
apt-get install php5-cli
cd /usr/bin
#install composer, notice the sudo to allow us to write to /usr/bin
php -r "readfile('');" | sudo php
#create a composer file that calls the composer.phar and add execute permission to it
sudo bash -c 'echo -e "#!/bin/bash\nphp /usr/bin/composer.phar "$@" > composer'
sudo chmod +x composer

1 Comment