Use PHP Code Sniffer (phpcs) in Sublimetext 3

sublime-phpcs

Today i found a great plugin for Sublimetext 3, it is called sublime-phpcs on Sublimetext 3. This plugin is to check if my php code is good according to the PHP Standard (PSR-1 and PSR-2). After the  default installation, the plugin was not working and return a lot of errors. So i dig around a bit and finally it is working now. Below are the requirements and how to install it (note that i'm on Ubuntu 14.04): PHP Pear PHP Code Sniffer (phpcs) Pear Package PHP ...

Git Ignore File Permission

Git-Logo

Using Ubuntu for web development is a perfect match. Since i migrate to Ubuntu a month ago, i could code faster and deliver more result. Instead of great environment, i also found an issue with Git and File Permission. By default Git detect file permission, and if i change a file or directory permission then Git will track it and consider it as new changes. In Windows environment, i never found this issue. And since i'm also using suPHP libraries on my LAMP stack, i must use 755 file ...

Linux Command “find” 101

commandline

It's been a month i move back to Ubuntu as my primary OS. And i would like to write one of the most use command in Linux: "find". This command is like a magic to search anything i want on my hard drive. I can find a text inside a file, or filter it for certain extension. I can search the files with latest modified time and also the file size. List to use Linux command "find" that mostly used by me: Find all PHP Files in a directory: Find a file with a name: Find file with wrong permission ...

Install PHP Common Libraries on Ubuntu

php

I'm using LAMP Stack on my Ubuntu desktop for my development environment. So i'm writing this article so i know what to install when i move or change my laptop. There are some PHP libraries that i must have to develop application using WordPress, Laravel, Codeigniter, PHP Slim Framework, etc. For fresh install Ubuntu i need to install PHP common libraries i need with this command: ...

Install Git From Source On Centos

Git-Logo

If you install Git from repository On Centos 6.5, you will the the old version of git v1.7.x. But i need to use a feature that only available on git v1.8.x or more, for example git pull --recursive, this command is for update git repository along with the submodules. So to fix it, i need to compile git from the sources. To do that you need to install some of the requirements as the command below: To install Git from Sources follow the steps below: I have been developing an auto deployment ...

Fix PHPMyAdmin Error When Using suPHP on Ubuntu 14.04

phpmyadmin

Since i move to Ubuntu recently, i need to setup all the development environment. My stack is using Nginx with Apache + PHP as the webserver and use MySQL as database. Since i don't like to use as the home directory for the apache, i moved it to my /home/ivan/public_html folder. And to make it easier, i need to change PHP to run as my user role. For that i install suPHP module on Apache, and then chmod 755 all the php files.   Everything is working correctly, except PHPMyAdmin, since ...

Back to Ubuntu after so long

ivan-love-ubuntu

It was 3 years ago i used Ubuntu for my main primary operating system. As a web developer using Linux based Operating system make things easier. My last Ubuntu Desktop was Ubuntu 10.10 Maverick Meerkat. Now 3 years has passed and when i come back, i saw that Ubuntu has grown so fast, now i install Ubuntu 14.04 Trusty Tahr as my primary operating system back again. My first impression was great, it was fast and lite, the Unity UI is smooth and easy to learn. But i feel it more like Mac OSX. ...

ModSecurity Error: UNSUPPORTED DELAYED Rules: Remote File Injection attempt in ARGS

ModSecurity

ModSecurity is an open source web application firewall. Working embedded in the web server, or standalone as a network appliance, it detects and prevents attacks against web applications. ModSecurity most of time embed with Apache webserver to block malicious request to the server. But recently I found an annoying false positive block with ModeSecurity. The error is like this: I created a test case that you can try it [here] (http://www.ivankristianto.com/examples/modescurity/), if you submit ...

Freenas 9.2.1 Bugs: CIFS cannot have file modified permission by default

FreeNAS-Project---Open-Source-Storage---FreeNAS-Project

I'm using Freenas for more than 2 years for our internal centralized file storage in our company. It is free and open source and have a lot of features. One features that i like the most is ability to limit access to certain data set per user or group. And they are using CIFS with Samba, and since i upgrade to Freenas 9.2.1, which use Samba 4.1.3 and and cause a problem with file modified permission by default. I got a lot of reports from my team mates as soon as i upgrade to Freenas 9.2.1, ...

PHP Script To Test Send Email

validar_email_php.jpeg

Sometimes sending email could be pain in the ass for some server. Especially if it is a share hosting that has blacklisted IP, and all the emails it send either go to spam box or doesn't deliver at all. As one of my services, is deploy a web application and most of the time sending email from my staging server is completely fine, but not in the client hosting server. So because i'm checking it over and over, in my free time i create a simple script to send email from the server. If you are ...