Fix error install phalconphp 3

Since I use Apricity and its arch linux ‘blood’ make me use latest php version (php 7.0.9 in time of writing) then I can’t get latest phalconphp (version 2). Finally I see phalconphp 3 released. I got little problem to install it but at least i know the error is in my side.

/tmp/yaourt-tmp-alamsyahr/aur-php-phalcon/src/cphalcon-3.0.0/build/php5/64bits/phalcon.zep.c:203:30: fatal error: ext/spl/spl_heap.h: No such file or directory
#include <ext/spl/spl_heap.h>
compilation terminated.
make: *** [Makefile:164: phalcon.lo] Error 1
==> ERROR: A failure occurred in build().
==> ERROR: Makepkg was unable to build php-phalcon.
==> Restart building php-phalcon ? [y/N]
==> ————————————
==> y
==> Edit PKGBUILD ? [Y/n] (“A” to abort)
==> ————————————

==> php-phalcon dependencies:
– php>=5.5 (already installed)
– gcc (already installed) [makedepend]

==> Continue building php-phalcon ? [Y/n]
==> ————————————-
==> n

php-config –version
?  ~
?  ~ php -v
PHP 7.0.9 (cli) (built: Jul 20 2016 17:12:28) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
?  ~ whereis php-config
php-config: /usr/bin/php-config /usr/local/bin/php-config /usr/share/man/man1/php-config.1.gz
?  ~ /usr/bin/php-config –version
?  ~ /usr/local/bin/php-config –version

Need to fix 5.2.17 version 🙂

ls -l /usr/local/bin | grep php-config
-rwxr-xr-x 1 root root     2104 Apr 18 15:39 php-config

sudo rm /usr/local/bin/php-config
rm: remove write-protected regular file ‘/usr/local/bin/php-config’? y


php-config –version

Yes, the error came since the output of php-config –version is 5.2.17 just remove it and I can continue for the ride 🙂

in PHP | 255 Words

How to Install Kotlin Language in Apricity Linux

Today I stumble upon a new language that looks promising in the future. Yes, its Kotlin Language. The syntax very ‘industrial minded’ in my opinion but I like it. I have put these 2 books for my next to buy for future reference :

Kotlin for Android Developers: Learn Kotlin the easy way while developing an Android App

Published by Createspace, on demand book publisher from Amazon. So far the book got 3 average reviews but I believe its enough for newbie android developer that looking for ‘other’ way than facing java in beginning 🙂

Kotlin in Action

Published by Manning, well known publisher. So far the book not released yet but the book author also developer of Kotlin.

Ups, back to installation. Lets get start!

Install Kotlin in Linux

$ curl -s “” | bash

$ source “/home/alamsyahr/.sdkman/bin/”

$ sdk help

==== BROADCAST =================================================================
* 25/07/16: Groovyserv 1.1.0 released on SDKMAN! #groovyserv
* 21/07/16: Grails 3.2.0.M2 released on SDKMAN! #grailsfw
* 18/07/16: Gradle 2.14.1 released on SDKMAN! #gradle

Usage: sdk <command> [candidate] [version]
sdk offline <enable|disable>

install   or i    <candidate> [version]
uninstall or rm   <candidate> <version>
list      or ls   [candidate]
use       or u    <candidate> [version]
default   or d    <candidate> [version]
current   or c    [candidate]
outdated  or o    [candidate]
version   or v
broadcast or b
help      or h
offline           [enable|disable]
selfupdate        [force]
flush             <candidates|broadcast|archives|temp>

candidate  :  the SDK to install: groovy, scala, grails, akka, etc.
use list command for comprehensive list of candidates
eg: $ sdk list

version    :  where optional, defaults to latest stable if not provided
eg: $ sdk install groovy

$ sdk install kotlin
==== INTERNET NOT REACHABLE! ===============================

Some functionality is disabled or only partially available.
If this persists, please enable the offline mode:

$ sdk offline


This command is not available while offline.

$ sdk install kotlin

==== BROADCAST =================================================================
* 26/07/16: Gaiden 1.1 released on SDKMAN! #gaiden
* 25/07/16: Groovyserv 1.1.0 released on SDKMAN! #groovyserv
* 21/07/16: Grails 3.2.0.M2 released on SDKMAN! #grailsfw

Downloading: kotlin 1.0.3

In progress…

######################################################################## 100.0%

Installing: kotlin 1.0.3
Done installing!

Do you want kotlin 1.0.3 to be set as default? (Y/n): y

Setting kotlin 1.0.3 as default.

Testing if Kotlin Present in System

$ kotlin -version

Kotlin version 1.0.3 (JRE 1.8.0_102-b14)

$ kotlinc -version

info: Kotlin Compiler version 1.0.3

Looks great. I can follow next step in manual 🙂

Install Android Studio 2 on Apricity Linux

I want to reinstall android studio on my apricity linux box and as always I need to write the process for my future reference.

Android Studio 2

I use yaourt :

yaourt -S android-studio

note : same command also work for upgrade Android Studio to newer version

Java in Apricity

By default android studio will install openjdk 7 so I ended with 3 version of Java after install Oracle JDK :

yaourt -S jdk

ls /usr/lib/jvm

default  default-runtime  java-7-openjdk  java-8-jdk  java-8-openjdk

Make Oracle JDK for Android Studio as it always give me warning :


“System Health
OpenJDK shows intermittent performance and UI issues. We recommend using the Oracle JRE/JDK.”

Set environment :

sudo nano /etc/environment

and this line :


save. For more detail explanation of switching you can refer to this.

Update :

Java Compiler aka javac

I just realized that javac command return an error :

javac -version

zsh: command not found: javac

Woot 🙂

ls -al /usr/bin | grep javac

lrwxrwxrwx 1 root root 30 Nov 2 2014 javac -> /usr/lib/jvm/default/bin/javac

quick resolv :

sudo rm /usr/bin/javac

sudo ln -s /usr/lib/jvm/java-8-jdk/bin/javac /usr/bin/javac

Testing javac version

javac -version

javac 1.8.0_102

Fix Java Version error message

For this error message :

Error:Buildtools 24.0.1 requires Java 1.8 or above.  Current JDK version is 1.7.

Open File -> Project Structure -> Locate for JDK 8 and hit OK button


Tuning Android Studio Memory Usage

I have 8 GB memory but still need to optimize performance of Android Studio

Click Help -> Edit Custom VM options, click Yes.


I change my minimum and maximum memory into these numbers :


Setting New PHP Development with Apricity OS & VirtualBox : Part 4 – Connecting Shared Folder, Setting PHP-FPM and Nginx


Host Activities

Create document root folder

In last post I already write about PHP installation in Ubuntu 14.04 LTS server 32 bit. All those PHP must have their own place and I already create the folders in VirtualBox Host (Apricity OS) within public_html folder :

php52; for location of testing on php 5.2.17

php53; for location of testing on php 5.3.29

php54; for location of testing on php 5.4.33

php55; for location of testing on php 5.5.34

php56; location of testing on php 5.6.20

php70; location of testing on php 7.0.5

Each folder already has file info.php with this code :




Continue reading

Setting New PHP Development with Apricity OS & VirtualBox : Part 3 – Install PHP 5.2, 5.3, 5.4, 5.5, 5.6 and 7.0 on single Ubuntu Server 14.04 LTS 32 bit

The application sholud be work on PHP 5 is no longer relevant term for my team. Client use more precision term like PHP 5.2.17, PHP 5.3.3 etc. Its insane to support checking all those claim. The only ‘fair’ play assumption is testing it with more common version. Like PHP 5.2 I decide to use latest version of 5.2 family like 5.2.17.

In this post I try to retry available post that already use same approach but using Ubuntu Server 16.04 LTS that use 64 bit architecture while I use 32 bit Ubuntu 14.04 server for this case.

The Plan

List of Supported PHP version in this post including from  museum are :

5.2 -> 5.2.17

5.3 -> 5.3.29

5.4 -> 5.4.33

5.5 -> 5.5.34

5.6 -> 5.6.20

7.0 -> 7.0.5

Those PHP version will be install in single VM that tun Ubuntu 14.04 server with memory 1GB. In case the memory not fit the process then I can add it easily 🙂


Install base package and friends

sudo apt-get install -y nginx git autoconf lynx wget build-essential libxml2-dev libssl-dev libbz2-dev libcurl4-openssl-dev  libpng12-dev libfreetype6-dev libxpm-dev libmcrypt-dev libmhash-dev libmysqlclient-dev libjpeg62-dev freetds-dev libjson-c-dev re2c

Setting Local Environment on Ubuntu 14.04 Server

sudo nano /etc/environment

Add these lines :


save. Continue reading