How to enable showing queries in Code Igniter profiling?

Its been now a while using CodeIgniter (PHP Framework), but i have been keep finding new stuff when face some dramatic problem. I have to enable a profiling in one my work and come accross a problem that profiling not showing any queries even database is selected.

To solve this problem goto system/database/DB_driver.php look for :

var $save_queries    = FALSE;

Set save_queries variable from FLASE -> TRUE so your new settings will be:

var $save_queries    = TRUE;

It will now show a queries into profiling. 🙂

How to kill process running on some port?

I have been facing a problem of how to kill a process running on some port. After some digging out on net i found out.

Here is a command line code (sort of shell script)

lsof | grep IPv | grep 3001 | awk '{print $2}' | xargs -l -i kill -9 {}

It did work for me :).

Are you experencing session problem with codeigniter 1.7.1?

It’s been a while i have been posted any thing on blog. I have been quite busy with my works, as i am using codeigniter for my current PHP project. We know that session.php comes with the codigniter is not good enough to handle session properly. If you already using it you may be experienced a problem of session still continue even if you close browser and reopen it again. Also remember me check box wont work.

After looking into forums i got a solution regarding it. I have added $sess_persistent_cookie variable into session.php and also write up a function to set it. This persistent cookie var will be responsible to work with remember me option. We have to just execute $this->session->sess_persistent_cookie(true) to enable remember me option. Also do not forgot to add this line to config.php of yours.

$config[‘sess_persistant_cookie’]     = TRUE;

You can download Session.php with this post. Anyone can use it with their own risk (nothing much to worry about it).  It will work like a charm :).

If any query just comment here.

The Dojo Offline Toolkit

Brad Neuberg has started work on the Dojo Offline Toolkit backed by the generosity of SitePen.

What is the Dojo Offline Toolkit?

The Dojo Offline Toolkit will be a small, cross-platform, generic download that enables web applications to work offline.

Let’s look at the Dojo Offline Toolkit from a user’s perspective. Imagine Alex is using a web-based real estate application for realtors built with the Dojo Offline Toolkit. In the upper-right corner of this web application is a button that says “Work Offline.” The first time Alex clicks on this button, a small window appears informing him that this web application can be accessed and used even if he is offline. If Dojo Offline has never been installed, Alex is prompted to optionally install a small 100K through 300K download that is automatically selected for his appropriate OS, including Windows, Linux/x86, and Mac OS X/Universal Binary.

Once Dojo Offline is installed with the included installer, the web-based real estate application prompts Alex to drag a hyperlink to his desktop and bookmark the web application’s URL. As Alex works online, anything that should be available offline is simply stored locally. If Alex is offline, he can reach his application by simply double-clicking the link on his desktop, opening its bookmark, or by simply typing in its normal web address. The application’s user-interface will magically appear in the browser, even if the user is offline, and all offline data will be retrieved from and stored into local storage. Dojo Offline detects when the network has reappeared, allowing the web application to send any data stored in local storage to the web server.

Local storage is done using Dojo Storage, which allows web applications to store hundreds of K or megabytes of information inside the browser, with the user’s permission. Dojo Storage is complete and works across 95% of the existing installed base of the web, including Firefox, Safari, and Mozilla on Windows, Linux, and Mac OS X. The Dojo Offline Toolkit will come bundled with Dojo Storage.

Once Dojo Offline has been installed, it will work for any web application that codes to it — it is completely generic and has no application specific information in its download. Applications have a consistent, simple API they can code to, the Dojo Offline and Dojo Storage APIs, to enable offline ability. Even better, since the user always interacts with the web application through its domain name, rather than through a file:// URL or http://localhost domain name, the web application runs under the same security policies as standard web sites, which means a user’s machine will not be compromised by an untrusted web application. The Dojo Offline Toolkit will work in Internet Explorer, Firefox, and Safari, and will run on Windows, Linux/x86, and Mac OS X/Universal Binary.

The Dojo Offline Toolkit will be fully open source, available under the same licenses as Dojo: the BSD and the AFL.

The work is done via the Proxy AutoConfiguration (PAC) feature in our browsers, and the final deliverable will consist of:

  • the Dojo Offline proxy
  • installers and uninstallers
  • PAC file generation and registration
  • the Dojo Offline API for easy, application-level access
  • the Dojo Offline web-based installer UI for downloading Dojo Offline documentation
  • a sample application, Moxie, modified to work with Dojo Offline
  • QA and bug fixing

Good luck to Brad. We look forward to hear about your experience, and progress!

Deja vu?

I was checking for their new layout. They have totally change the old layout to new funky and cool layout. I seen big advertisement of hd trailers of movie named “Transformers” directed by Michael Bay

I was watching the trailer of transformers and very soon reliase that opening sequence of trailer remind me my brother FXwars winner animation Close Encounters. The opening sequence of transformers trailer shows that some UFO coming down to earth from the outer space. Sequence of landing UFO to earth are so matching and similar concept with my brother’s (Jignesh Jariwala) fxwars animation which won the fxwars challenge in 2005. This makes me so surprised.I having both small clips from the both movie.

My Bro’s Movie Close Encounters Clip
Transformer Movie Clip

Now you guyz decide who having deja vu?