Fix Strange “Headers already sent by” in Line 1 PHP File

hex-editor

"Cannot modify header information - headers already sent by" error is most common PHP error happen when we develop a web application. Usually when we want to redirect or send cookie. I used to get that warning a lot long time ago. But since i standardize my PHP code, it doesn't happen for a while now, until last night. Yesterday night i was fixing somebody else code and audit the performance as well as the security. But when testing it, i got very strange error, the error was "Headers ...

Linux Shellshock Security Patch

security

Just doing  a routine browsing this morning and i found that my Ubuntu is vulnerable with Shellshock attack. Shellshock is newly discovered security vulnerable for your bash, which means all Linux and Max are vulnerable from this security issue. Shellshock using crafted environment in bash script and gain access to your computer. This is more serious than heartbleed a while ago. To test if your Linux is vulnerable, run this script on your bash terminal: If you see a message: vulnerable ...

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 ...

css.php