Install New Phalcon PHP (v 4) in Windows 10 64 bit and Laragon

Since its v4 release I don’t have time to test this version in my windows 10 box.

Today is the right time because I don’t know, I want to hehehe.

I already have phalcon 3.4.5 installed and related phalcon dev tools.

phalcon info

Phalcon DevTools (3.4.0)

OS: Windows NT DESKTOP-O8J2929 10.0 build 18362 (Windows 10) AMD64
PHP Version: 7.2.26
PHP Bin: C:\laragon\bin\php\php-7.2.26-nts-Win32-VC15-x64\php.exe
PHP Extension Dir: C:\php\ext
PHP Bin Dir: C:\php
Loaded PHP config: C:\laragon\bin\php\php-7.2.26-nts-Win32-VC15-x64\php.ini
Phalcon DevTools Version: 3.4.0
Phalcon Version: 3.4.5
AdminLTE Version: 2.3.6

PHP 7.4.4 nts already in place

? php -m | grep phalcon
Warning: Cannot load module ‘phalcon’ because required module ‘psr’ is not loaded in Unknown on line 0

? php -m | grep phalcon

Choose DLL version

Choose proper nts for my 64 bit machine

Enable phalcon and psr extension from Extensions menu and restart laragon

nice, phalcon 4.0.6 installed successfully

Time for phalcon devtools

Preparation before cloning

mv phalcondevtools phalcondevtools3

git clone
Cloning into ‘phalcon-devtools’…
remote: Enumerating objects: 27110, done.
remote: Total 27110 (delta 0), reused 0 (delta 0), pack-reused 27110
Receiving objects: 100% (27110/27110), 19.44 MiB | 1.65 MiB/s, done.
Resolving deltas: 100% (14463/14463), done.


mv phalcon-devtools phalcondevtools4

mv phalcondevtools3 phalcondevtools

At this moment I have two folder :

phalcondevtools -> for phalcon 3

phalcondevtools4 -> for phalcon 4

Install phalcon dev tools 4′

cd phalcondevtools4

composer install

Check it now

C:\phalcondevtools4 (master)
? phalcon info

Phalcon DevTools (4.0.3)

OS: Windows NT DESKTOP-O8J2929 10.0 build 18362 (Windows 10) AMD64
PHP Version: 7.4.4
PHP Bin: C:\laragon\bin\php\php-7.4.4-nts-Win32-vc15-x64\php.exe
PHP Extension Dir: C:\php\ext
PHP Bin Dir: C:\php
Loaded PHP config: C:\laragon\bin\php\php-7.4.4-nts-Win32-vc15-x64\php.ini
Phalcon DevTools Version: 4.0.3
Phalcon Version: 4.0.6
AdminLTE Version: 2.3.6

Test call from absolutee path


Phalcon DevTools (4.0.3)

Available commands:
info (alias of: i)
commands (alias of: list, enumerate)
controller (alias of: create-controller)
module (alias of: create-module)
model (alias of: create-model)
all-models (alias of: create-all-models)
project (alias of: create-project)
scaffold (alias of: create-scaffold)
migration (alias of: create-migration)
webtools (alias of: create-webtools)
serve (alias of: server)
console (alias of: shell, psysh)

Great, now its time for symbolic link

Well, at the moment symbolic link is not work so I use absolute path to create phalcon 4 project.

in Blog | 375 Words

Compile Phalcon Extension on Centminmod

Wow, almost a year I didn’t touch this blog. At least this blog still have visitor from nowhere 🙂

Ok, today I have challenge to install phalcon php extension (at the moment the version is 3.4.2). The vps server already has centminmod installed using latest version of CentOS 7.

Since the server is critical so I decide to use other vps server (get free $25 in credit for new user here) to get the recipe and share it here for others that might need it.

Lets get start!

Update CentOS

# yum update

Check current php version

# php -v

PHP 7.0.33 (cli) (built: Feb 16 2019 10:38:06) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.33, Copyright (c) 1999-2017, by Zend Technologies

Yes, this legacy app run on php 7.0.33

Compile Phalcon php

# git clone --branch v3.4.2 --depth=1 "git://"

# cd cphalcon/build/

# ./install

Configuring for:
PHP Api Version: 20151012
Zend Module Api No: 20151012
Zend Extension Api No: 320151012
appending configuration tag “CXX” to libtool
mkdir .libs
gcc -I. -I/root/cphalcon/build/php7/64bits -DPHP_ATOM_INC -I/root/cphalcon/build/php7/64bits/include -I/root/cphalcon/build/php7/64bits/main -I/root/cphalcon/build/php7/64bits -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DPHALCON_RELEASE -DHAVE_CONFIG_H -march=native -mtune=native -O2 -fomit-frame-pointer -c /root/cphalcon/build/php7/64bits/phalcon.zep.c -fPIC -DPIC -o .libs/phalcon.o

gcc -shared .libs/phalcon.o -march=native -mtune=native -Wl,-soname -Wl, -o .libs/
(cd .libs && rm -f && ln -s ../
cp ./.libs/ /root/cphalcon/build/php7/64bits/modules/
cp ./.libs/phalcon.lai /root/cphalcon/build/php7/64bits/modules/
PATH=”$PATH:/sbin” ldconfig -n /root/cphalcon/build/php7/64bits/modules
Libraries have been installed in:

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR’
flag during linking and do at least one of the following:
– add LIBDIR to the `LD_LIBRARY_PATH’ environment variable
during execution
– add LIBDIR to the `LD_RUN_PATH’ environment variable
during linking
– use the `-Wl,–rpath -Wl,LIBDIR’ linker flag
– have your system administrator add LIBDIR to `/etc/’

See any operating system documentation about shared libraries for
more information, such as the ld(1) and manual pages.

Build complete.
Don’t forget to run ‘make test’.

Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20151012/
Installing header files: /usr/local/include/php/

Thanks for compiling Phalcon!
Build succeed: Please restart your web server to complete the installation

Enable phalcon extension

# nano /etc/centminmod/php.d/phalcon.ini

fill with this line :

save the file and restart

# nprestart

Check if phalcon extension installed

echo ‘<?php phpinfo();?>’ > /usr/local/nginx/html/info2.php

then access it with browser

or using command line

# php -m | grep phalcon

Handling rewrite problem

“Mod-Rewrite is not enabled

Please enable rewrite module on your web server to continue”

# nano /usr/local/nginx/conf/conf.d/

Change these sections :

1. root /home/nginx/domains/url/public/public;
2. try_files $uri $uri/ /index.php?_url=$uri&$args;


Update 1 :

section 2 need to update as this :

try_files $uri $uri/ @rewrite;

and make new section for @rewrite :

location @rewrite {
rewrite ^/(.*)$ /index.php?_url=/$1;
} #rewrite

Update 2 :

Handling error message :

“warning: Remote branch v3.4.3 not found in upstream origin, using HEAD instead”

wget -c

tar xvzf v3.4.3.tar.gz

cd cphalcon-3.4.3/build/


Try if rewrite rule work

Edit controller file

# nano /home/nginx/domains/url/public/app/controllers/IndexController.php

Modify the content to this


class IndexController extends ControllerBase

public function indexAction()


public function testAction($id1,$id2,$id3)

echo ‘really nice bro ‘.$id1.’ var 2 :’.$id2.’ var 3 : ‘.$id3;

save the file.

Access the address from browser


and the output will be

really nice bro d var 2 :e var 3 : f

Great, since the value of d,e and f printed correctly then rewrite rule work perfectly.

Note :

  • I upload sample project inside public folder so for root (document root) I change it to public/public.
  • url in this note is depend on you. It might be tld os subdomain
  • I enable https by default so I only deal with ssl.conf file
  • webtools only available from localhost, enable it from cmd -> phalcon project projectname –enable-webtools
in Blog | 819 Words

UpCloud review : another FreeBSD supported VPS

My friend ask me to try upcloud and want me to recap my review in pictures as usual. Well, after use his referrall link (I got free $25 in credit plus $10 in deposit to lift trial limitation) I’m ready to go 🙂

My observation for upcloud


#1 Easy to use interface

I have no problem in using their UI. Separation important feature are well organized (ssh key, initialization scripts).

#2 Fast Server

I use freebsd ports to compile a stack (famp) and seem to work well. I think they use newer hardware that accelerate well.

#Backup system

smooth daily backup, very important for me.

#3 Many europe zone

I just realize if Helsinki exist.

#4 Good internal IP

I’ve just found out that internal ip is work for my limited vpn stuff.

#5 Timezone

It will eliminate the step for change date during post install process.

#6 Reverse DNS name

Handy for dns related configuration.

#7 FreeBSD support

Yes, the OS available under OS Template -> CDROM

FreeBSD 11.0-RELEASE amd64 Installation CD



#1 No Paypal

My bad, looks like it supported now 🙂

#2 no OpenBSD, DragonFlyBSD and NetBSD support

I hope they can add those OS on CDROM collection or just enable custom CDROM like vultr did.

#3 No reinstall option

I hope they can add this feature soon

#4 No block or storage support

I hope they will add ‘space’ or block like DigitalOcean.

#5 No TFA login

Add more security for us please.

Overall its good service and with Nokia spirit I hope they can grow bigger like others so we can get more reliable provider in the future.

If you want to try upcloud then you can use my referrall link and get free $25.

Install Ted on Centos 7.4

Long time hiatus 🙂 . Yes, being busy with unnecessary things but its fine I come back after a year hahaha.

Today I want to share proces for install Ted, I need this for rtftopdf purpose. rpm file not work for my case since I use latest CentOS (7.4 at this moment).

The install process is straight, lets get start!

Install required tools

yum install gcc gcc-c++ autoconf automake libXpm-devel pcre-devel
zlib-devel ImageMagick libtiff-devel libpng-devel libjpeg-devel gtk+
gtk+-devel gtk2-devel zlib-devel libpng-devel libjpeg-devel gtk2-devel

Get latest Ted and install


tar xvzf ted-2.23.src.tar.gz

cd Ted-2.23/
make package
make install

which Ted

To get rtf2pdf work you’ll need ghostscript

Install Ghostscript

yum install ghostscript

Download rtf to pdf



Free $20 for DevOps Class – openbsd, freebsd, dragonflybsd and netbsd vps

Update : The offer seem no longer available.

I have to prepare for new class that required vps access. The class will teach unix based system like openbsd, freebsd, dragonfly bsd plus netbsd in 12 meets.

This class will be basic for devops but most important thing for me is my student can get full environment in every OS. Vps came to my mind and this March 2017 is really great since Vultr announce great news :

They double everything and they also provide ‘sanbox plan’ for beginner.

In nutshell you’ll get 1GB memory and 25Gb space vps on the OS you choose. SSD speed also superb :

dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
16384+0 records in
16384+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 3.87756 s, 277 MB/s

For limited time Vultr offer free $20 that you can use for many things;

  • Set git server using gitlab.
  • Set up aws compatible cloud with minio
  • Testing zfs latest FreeBSD 12 vs Hammer in dragonflybsd
  • Tes mysql replicate while setting master in Germany Vps and mysql slave in Paris or Amsterdam.

Long time ago I’ll need $10 server to achieve that but now I just need $5 vps server /mo to get 1GB server which is awesome 🙂

I just spread the news to let others know and grab your free $20 by using this link.

Long live the queen!

in Blog | 221 Words