Calibreworks\devstack is a vagrant based on virtualbox for a LAMP stack that works. I created a virtual box for my development environment stack.We are using this in our day to day development cycle. It is based on Ubuntu 14.04.3, Apache 2.4, PHP 5.5 and MySQL 5.5.I thought that this is worth sharing to all of you. So you can use this stack and help you in your day to day development. And if you like to contribute, a pull request is always welcome through this github.How to use: … Read more...
Connecting Evernote with Sublime Text 3
I love Sublime text 3 and use Evernote a lot. And today I would like to share how to connect Evernote with Sublime Text 3. This is useful because most of the times i store my code snippet on my Evernote account. And since I'm using Ubuntu, there is no native Evernote client, so the only way I can use it is using Evernote web.To cut it short, to connect Evernote with Sublime Text 3, I'm using Sublime module called sublime-evernote. You can see the source from Github.Installation … Read more...
Fix Strange “Headers already sent by” in Line 1 PHP File
"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 already … Read more...
Use PHP Code Sniffer (phpcs) in Sublimetext 3
PS: This is an old article, it may not work anymore. I would suggest to try IDE such as VSCode or PHPStorm for better phpcs support.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 … Read more...
Git Ignore File Permission
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 … Read more...
Install PHP Common Libraries on Ubuntu
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: … Read more...
Install Git From Source On Centos
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 … Read more...
ModSecurity Error: UNSUPPORTED DELAYED Rules: Remote File Injection attempt in ARGS
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 … Read more...
PHP Script To Test Send Email
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 … Read more...
Jump Start Your Web Application With PHP Composer
If you are a web developer and love to use PHP, i bet you have heard about composer. Composer is dependency manager for PHP. So what is dependency means? In developing a web application you may need to use one or more libraries. In my case i often use these libraries: monolog, slim, laravel, debug helper, and laravel. Without composer it would take me hours just to do the environment setup. With composer i just need to define a composer.json file, and composer will handle the rest, … Read more...