How to install Xampp Linux on Peppermint OS 5

I have a few php system at the moment. My 1st system is php and folks (mysql etc) installed via apt-get . 2nd system is PHP system using phpfarm technique . This time I want to add other system that backed by Xampp :-) . Lets start add this big boy.

Download Latest xampp for linux (at this time I use xampp for 64 bit).


$ wget -c

$ mv\?r\=

$ chmod +x

$ sudo ./

Execute as super user or sudo

# ./


Make sure core files selected.


After installation finish you might want to test run it.

Stop all running instance of Apache and Mysql

# service apache2 stop
* Stopping web server apache2 *
# service mysql stop
mysql stop/waiting

# /opt/lampp/xampp start
Starting XAMPP for Linux 5.6.3-0…
XAMPP: Starting Apache…ok.
XAMPP: Starting MySQL…ok.
XAMPP: Starting ProFTPD…ok.
# /opt/lampp/xampp stop
Stopping XAMPP for Linux 5.6.3-0…
XAMPP: Stopping Apache…ok.
XAMPP: Stopping MySQL…ok.
XAMPP: Stopping ProFTPD…ok.

Or using sudo

$ sudo /opt/lampp/xampp start
Starting XAMPP for Linux 5.6.3-0…
XAMPP: Starting Apache…ok.
XAMPP: Starting MySQL…ok.
XAMPP: Starting ProFTPD…ok.



Document root setting

$ sudo nano /opt/lampp/etc/httpd.conf

Find these lines :

DocumentRoot “/opt/lampp/htdocs”
<Directory “/opt/lampp/htdocs”>

Change to your preferences.

Save when you’re done.

Access MySQL command line

$ sudo /opt/lampp/bin/mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.6.21 Source distribution

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.


Change MySQL password

Continue from previous prompt

mysql> use mysql;
Database changed
mysql> update user set password=password(‘123456′) where user=’root’;
Query OK, 2 rows affected (0,00 sec)
Rows matched: 2 Changed: 2 Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0,00 sec)

mysql> exit

Install IonCube Loader

IonCube provide loader for 32 and 64 bit architecture.

Download latest version from here.

$ wget -c

$ tar xvjf ioncube_loaders_lin_x86-64.tar.bz2

Which version?

Based on phpinfo() . Its PHP 5.6.3 then I must copy ioncube/ to

directory that provide by phpinfo() information


$ sudo mv ioncube/ /opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/

Tell php.ini for new shared object file.

$ sudo nano /opt/lampp/etc/php.ini

Add this line :

zend_extension = /opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/


Restart xampp

$ sudo /opt/lampp/xampp restart

Recheck phpinfo() page to find this information.


Install PhalconPHP Extension on Linux Xampp

$ wget -c ""

$ unzip

$ cd cphalcon-master/build/64bits/

$ /opt/lampp/bin/phpize --enable-phalcon --with-php-config=/opt/lampp/bin

Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226

$ ./configure --with-php-config=/opt/lampp/bin/php-config

$ make

$ sudo make install

[sudo] password for alamsyah:
Installing shared extensions: /opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/

$ sudo echo "" >> etc/php.ini

Restart Xampp

$ sudo /opt/lampp/xampp restart

Check phpinfo() page to see


Reference : Belajar Phalcon Framework

How to install Apache, MariaDB and PHP on CentOS 7 minimal

After install and configure network under CentOS 7 minimal I continue with LAMP section. Since the machine has 4GB memory I prefer to use old fashion LAMP. Only switch MySQL with MariaDB :-)

The steps for LAMP installation for my own reference and my vps need :

Install required Package

Install nano

# yum install nano

Install Apache, PHP and MariaDB

# yum install httpd mariadb-server mariadb php php-mysql php-mysqli php-gd php-pear php-mbstring

Configure Apache

Start httpd

# systemctl start httpd.service

Set httpd to auto start after reboot or boot process

# systemctl enable httpd.service
ln -s ‘/usr/lib/systemd/system/httpd.service’ ‘/etc/systemd/system/’

By default firewall will block access. To exclude http from firewall block :

# firewall-cmd --permanent --add-service http

# systemctl restart firewalld.service

Try visit ip address from browser


Configure MariaDB

Start mariadb

# systemctl start mariadb

Set mariadb to autostart

# systemctl enable mariadb.service
ln -s ‘/usr/lib/systemd/system/mariadb.service’ ‘/etc/systemd/system/’

Set password for mariadb, delete unnecessary database and users.

# mysql_secure_installation
/usr/bin/mysql_secure_installation: line 379: find_mysql_client: command not found


In order to log into MariaDB to secure it, we’ll need the current
password for the root user.  If you’ve just installed MariaDB, and
you haven’t set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
… Success!

By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
… Success!

Normally, root should only be allowed to connect from ‘localhost’.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
… Success!

By default, MariaDB comes with a database named ‘test’ that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
– Dropping test database…
… Success!
– Removing privileges on test database…
… Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
… Success!

Cleaning up…

All done!  If you’ve completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

I also need to enable firewall to exclude future database remote backup. Port 3306 is required to open.

# firewall-cmd --permanent --add-port=3306/tcp
# systemctl restart firewalld.service


Next step is measure time needed from start server to get login display and make my report.

Using multiple php inside one Ubuntu machine

programmer plus gamerAnother challenge came. One of our application finally updated. The application development use php 5.3 + and already pass with php 5.5+ version. Time for migration schedule and the requirement is obvious : the machine able to run 2 different php (php 5.2.17 is a must and other php version is at least 5.3+). The machine I use is Ubuntu 12.04 32 bit ( I prefer to use old supported version due to lower memory consumption than 14.04).

Quick google give me reference to phpfarm and other resources. As I said in previous post, php 5.2.17 successfully installed after applied a patch (installed on Ubuntu 14.04). For reference purpose I share my experience here. Target php extensions are standard like support for mysql, pdo and gd extension.

Note : if you want to to try / apply it using vps then You’ll need memory minimal 1GB. My box show this memory utilization (32 bit). Click here for hourly cheap vps.

# free -m
total       used       free     shared    buffers     cached
Mem:           873        786         87          0         78        569
-/+ buffers/cache:        138        734
Swap:          890          0        890

Disable php5 module (optional)

In case you already install php5 as apache module you must disable it first.

#a2dismod php5

Fixing locale

Locale error are pop up everywhere first time I install. I need to get rid from this error.

# locale

locale: Cannot set LC_ALL to default locale: No such file or directory

# nano /etc/environment

read more »

Compile PHP 5.2.17 using phpfarm

In general phpfarm is working well in case you need multiple php environment in single machine. Special case is for PHP 5.2.17 (latest version of 5.2 generation), I got this error when compile :

opt/phpfarm/src/php-5.2.17/ext/dom/node.c: In function ‘zim_domnode_getNodePath’:
/opt/phpfarm/src/php-5.2.17/ext/dom/node.c:2002:8: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
value = xmlGetNodePath(nodep);
make: *** [ext/dom/node.lo] Error 1
make failed.

Google suggest me for apply patch.

php programmer

$cd php-5.2.17

$sudo curl -o php-5.2.17.patch
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
100  1817  100  1817    0     0    722      0  0:00:02  0:00:02 –:–:–   722

run the patch ::

$sudo patch -p0 -b < php-5.2.17.patch

patching file ext/dom/node.c
Hunk #1 succeeded at 1950 (offset 55 lines).
patching file ext/dom/documenttype.c
Hunk #1 succeeded at 215 (offset 10 lines).
patching file ext/simplexml/simplexml.c
Hunk #1 succeeded at 1343 (offset -74 lines).

$cd ..

$ sudo ./ 5.2.17

and finally get this :

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

Installing PHP SAPI module:       cgi
Installing PHP CGI binary: /opt/phpfarm/inst/php-5.2.17/bin/
Installing PHP CLI binary:        /opt/phpfarm/inst/php-5.2.17/bin/
Installing PHP CLI man page:      /opt/phpfarm/inst/php-5.2.17/man/man1/
Installing build environment:     /opt/phpfarm/inst/php-5.2.17/lib/php/build/
Installing header files:          /opt/phpfarm/inst/php-5.2.17/include/php/
Installing helper programs:       /opt/phpfarm/inst/php-5.2.17/bin/
program: phpize
program: php-config
Installing man pages:             /opt/phpfarm/inst/php-5.2.17/man/man1/
page: phpize.1
page: php-config.1
Installing PDO headers:          /opt/phpfarm/inst/php-5.2.17/include/php/ext/pdo/


check version now ::

$ /opt/phpfarm/inst/php-5.2.17/bin/php -v

PHP 5.2.17 (cli) (built: Sep 24 2014 16:53:53) (DEBUG)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies

Archive patch for backup (php5.2.17.patch.txt)

How to install Laravel on FreeBSD 9.2

Laravel Shirt - Basic Dark As I have more machine that run FreeBSD 9 I decide to explore the installation process of PHP Framework. I want to start with Laravel as I feel this framework will be suitable with our team requirement. I already have working PHP 5.2.17 with Apache on my FreeBSD 9.2 box so I have to upgrade it to another version. Lets get started :

Checking installed PHP, MySQL and  Apache

Check PHP

# pkg_info | grep php
php52-5.2.17_15     PHP Scripting Language
php52-ctype-5.2.17_15 The ctype shared extension for php
php52-curl-5.2.17_15 The curl shared extension for php
php52-dom-5.2.17_15 The dom shared extension for php
php52-extensions-1.3_1 A “meta-port” to install PHP extensions
php52-filter-5.2.17_15 The filter shared extension for php
php52-gd-5.2.17_15  The gd shared extension for php
php52-hash-5.2.17_15 The hash shared extension for php
php52-iconv-5.2.17_15 The iconv shared extension for php
php52-json-5.2.17_15 The json shared extension for php
php52-pcre-5.2.17_15 The pcre shared extension for php
php52-pdo-5.2.17_15 The pdo shared extension for php
php52-pdo_mysql-5.2.17_15 The pdo_mysql shared extension for php
php52-pdo_sqlite-5.2.17_15 The pdo_sqlite shared extension for php
php52-posix-5.2.17_15 The posix shared extension for php
php52-session-5.2.17_15 The session shared extension for php
php52-simplexml-5.2.17_15 The simplexml shared extension for php
php52-spl-5.2.17_15 The spl shared extension for php
php52-sqlite-5.2.17_15 The sqlite shared extension for php
php52-tokenizer-5.2.17_15 The tokenizer shared extension for php
php52-xml-5.2.17_15 The xml shared extension for php
php52-xmlreader-5.2.17_15 The xmlreader shared extension for php
php52-xmlwriter-5.2.17_15 The xmlwriter shared extension for php

Check MySQL

# pkg_info | grep mysql
mysql51-client-5.1.72 Multithreaded SQL database (client)
mysql51-server-5.1.72 Multithreaded SQL database (server)
php52-pdo_mysql-5.2.17_15 The pdo_mysql shared extension for php

Check Apache

# pkg_info | grep apache
apache22-2.2.26     Version 2.2.x of Apache web server with prefork MPM.

Upgrade PHP and the Extensions

According to Laravel documentation, PHP version needed for Laravel 4 is PHP >=5.3.7

# cd /usr/ports/lang/ && ls | grep php

More in PHP5 port

# cat php5/Makefile | more

# Created by: Alex Dupre <>
# $FreeBSD: lang/php5/Makefile 330741 2013-10-18 12:37:45Z ale $

PORTNAME=       php5
PORTVERSION=    5.4.21
CATEGORIES?=    lang devel www
MASTER_SITE_SUBDIR=     distributions

Ok, I’ll choose PHP5 port only as this version will give me PHP 5.4.21 which is supported by Laravel and also supported by specific package such as Laravel 4 Generator by Jeffery Way.

Delete older PHP 5.2

# pkg_delete -vx php52

Install PHP 5.4

# cd /usr/ports/lang/php5 && make install


Choose options; CLI, Apache module and LINKTHR.

Check PHP version after install

# php -v
PHP 5.4.21 (cli) (built: Dec 17 2013 13:07:34)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

ok, continue with PHP extensions

# cd /usr/ports/lang/php5-extensions && make install

Choose same as old process (PHP 5.2 install) + Mcrypt.


Restart Apache

# service apache22 restart
Performing sanity check on apache22 configuration:
Syntax OK
Stopping apache22.
Waiting for PIDS: 789.
Performing sanity check on apache22 configuration:
Syntax OK
Starting apache22.


At this stage we have working Apache, MySQL and PHP on FreeBSD 9.2

Install Composer & Laravel

Download Composer

I use snapshot version of Composer

# wget -c

# ln -s /home/alam/composer.phar /usr/local/bin/composer

# chmod 755 composer.phar

Download Laravel

# wget -c --no-check-certificate

Unzip Laravel

# unzip

Move Laravel to documentroot

# mv /home/alam/laravel-master /usr/local/www/apache22/data/laravel

Open composer.json

# cd /usr/local/www/apache22/data/laravel/ && ee composer.json

Add Jeffery Way Generator

“name”: “laravel/laravel”,
“description”: “The Laravel Framework.”,
“keywords”: [“framework”, “laravel”],
“license”: “MIT”,
“require”: {
“laravel/framework”: “4.1.*”,
“way/generators”: “dev-master”


Install Laravel through Composer

# cd /usr/local/www/apache22/data/laravel/

# composer install

All files will be download and when ready you can access it like previous how to.

Picture from : Laravel Shirt – Basic Dark by titeyado