Task was canceled – ‘Default Repository’ of type com.atlassian.bamboo.plugins.vcs:task.vcs.checkout.

Error on atlassian bamboo when proceeding checkout task:

Task was canceled - 'Default Repository' of type com.atlassian.bamboo.plugins.vcs:task.vcs.checkout.

Solution:

Check if git does exist on bamboo agent

Upgrade bamboo remote agent atlassian-bamboo-agent-installer-x.x.x.x.jar to latest version

Task was canceled – ‘Default Repository’ of type com.atlassian.bamboo.plugins.vcs:task.vcs.checkout.

PHP Delete element from array with array_splice()

array_splice()

If you use array_splice() the keys will be automatically reindexed, but the associative keys won’t change opposed to array_values() which will convert all keys to numerical keys.

Also array_splice() needs the offset, not the key!, as second parameter.

Code

php

    $array = array(0 => "a", 1 => "b", 2 => "c");
    array_splice($array, 1, 1);
                       //↑ Offset which you want to delete

?>

Output

Array (
    [0] => a
    [1] => c
)

array_splice() same as unset() take the array by reference, this means you don’t want to assign the return values of those functions back to the array.

PHP Delete element from array with array_splice()

configure: error: mcrypt.h not found. Please reinstall libmcrypt

On Centos6/7, when compile PHP from source:

configure: error: mcrypt.h not found. Please reinstall libmcrypt

To fix this:

yum update epel-release
yum install -y libmcrypt-devel

or if it doesn’t work, use epel-release from Fedora:

rpm -ivh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum install -y libmcrypt-devel

 

 

 

configure: error: mcrypt.h not found. Please reinstall libmcrypt

Vagrant error Failed to mount folders in Linux guest “vboxsf” file system is not available

Error when ‘vagrant up':

Failed to mount folders in Linux guest. This is usually because
the “vboxsf” file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:

mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3`
SSH /SSH
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` SSH /SSH

The error output from the last command was: /sbin/mount.vboxsf: mounting failed with the error: No such device

Solution:

vagrant plugin install vagrant-vbguest

vagrant up

Vagrant error Failed to mount folders in Linux guest “vboxsf” file system is not available