i Web Programming Archives

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

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 PearPHP Code Sniffer (phpcs) Pear PackagePHP Depends Pear … 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...

Create Local VirtualHost For Your Development Environment

If you are using xampp, you can access your local server just by go to http://localhost. So now i would like to share to you how to create your own local domain and add your local domain into apache virtual host, so you can have your local website for development purpose. For example you can have www.domain.local. To create this you only need to edit your apache vhost and your hosts file.If you are using Windows you can edit your hosts files in C:\Windows\System32\drivers\etc\hosts, you can … Read more...

DB Cache Reloaded Fix on Github

First of all i would like to thanks all of you that already support me and using DB Cache Reloaded Fix plugin. And also i would to apologize if lately the DB Cache Reloaded Fix development is delayed. I also keep reading the WordPress forum for my plugin development, and there are some nice idea and fixes that need to be implemented, but i really busy at the moment since i just build my own company. And there are many things on my plate to do.And there some brilliant developers ask me if … Read more...

DB Cache Reloaded Fix v2.2.4 Released

I'm happily to announce DB Cache Reloaded Fix v2.2.4. For you who don't know DB Cache Reloaded Fix, it's a WordPress plugin to cache the queries made to the database whereas improve your WordPress blog performance. It's not originally mine, but it is a fork from the old DB Cache Reloaded which not compatible since WordPress 3.1. And thanks for all of you, your input and feedback is really helpful. What's New in DB Cache Reloaded Fix v2.2.4 There are some fixes that will definitely improve the … Read more...

Facebook Thumbnail Image

Here come a question from my Facebook fans regarding Facebook thumbnail image: [quote]How can i share my blog post with the right thumbnail on Facebook? Sometimes it show the wrong thumbnail and worst doesn't show any thumbnail.[/quote]Facebook Thumbnail Image ExplanationFirst we need to find out what cause the issue. Facebook script trying to parse your web page and looking for the right image for the thumbnail. But most of the time it is fail to give the right image and worst no image … Read more...

AJAX and Javascript Live Testing Tools

Ajax and javascript is hard to debug and find where it go wrong. One of the great offline tools to debug your ajax and javascript code is Firebug with Firefly extension. But you need to modify your code and insert some debug code from firebug, and you can see the result in Firebug windows. I have it in my Firefox browser to develop my projects, but sometimes i need to testing ajax live or testing javascript live without using Firebug.These are the best 2 online ajax and javascript testing … Read more...

Facebook FBML Live Testing Tool

Recently i tried to developing an application for Facebook as my client demand. Facebook use XFBML (eXtensible FaceBook Markup Language) as their mark up language to use Facebook UI and API. And it took me a while to testing and do it right since i have to try and error it for every changes i made. And i just found (i know it's been a while there) Facebook FBML live testing tools provide by Facebook developer.This application called Rell, it is FBML and javascript test console, saving so … Read more...