• Dream Come True: Nikon D90

    Doesn’t it feel so good when you finally get what you’ve been waiting for years!? The Nikon D90, a dream camera of mine is finally within the reaches of my hands!

    My new toy, the Nikon D90 (taken by a Samsung Galaxy S2)

    Just a revisit from last year’s post: Target Camera: Nikon D90 | Misty-Stix

    The last camera I had was a Fujifulm S200EXR. It did a great job taking pictures for me but then I reached a point where I am already being limited by its capabilities. Its still a great camera, however! And now, I am able to take pictures I’ve been longing to take using the manual-focus plus the broad and plentiful customization elements of the manual option.

    Here are some sample shots (click to enlarge):

    .. and finally, that sweet smile from Jen!

    I am so loving the D90 so far. Never did I feel regret for the cost of buying this camera.


  • Dynamic Forms Revisited

    dynamic forms

    Why I called this a revisited issue is because I’ve asked this before in the stackoverflow community. Check this link: http://stackoverflow.com/questions/2293512/web-ui-dynamic-web-forms.

    The problem lies in the dynamic generation of components from within a form, for instance, your data-structure follows the one-has-many setup. Take for example a person who has one or more cars, then we would like to have multiple cars to add or to remove from the form.

    Lately, a similar project reached my desk and I am faced with a very similar issue. Before, I’d just rewrite the code I wrote as a patch-up to what I did years ago using duplicate javascript code with the help of jquery and json. But alas, I’d want a plugin to do the work for me, well, extjs, a product of sencha is for-sale and its good but I’d like a small fix that would simply solve my problem, at least.

    Again, I tried searching the web for alternatives on what to use re: dynamic forms and the keyword ‘lambda’ appears. A solution has been rediscovered after all this time http://code.google.com/p/jquery-dynamic-form. This solution is the perfect candidate to solve my dynamic forms problem, the code is as simple as this:

    dynamic form

    I intend to make a simpler example of the code so that it’d be easier to read.

    Javascript: [cc lang=”php” tab_size=”2″ lines=”-1″]


    [/cc]

    HTML:[cc lang=”php” tab_size=”2″ lines=”-1″]

    whitelists




    [-] [+]


    [/cc]

    Just in case the later versions of jquery.dynamic do not work for you, I have included the jquery plugin I used and tested.

    I’ve used jquery version 1.4.2.

    download source: jquery.lambda


  • Domain Level Error Logging in Apache/PHP in Linux

    The error logging functionality of apache is very important especially when you are testing things out with your php application. But on some cases we experience problems which hinder us from locating the error_log file where all errors, problems or warnings reside whenever we attempt to debug our application.

    Problems we usually encounter are: Where’d my error_log file go? How can I enable it? It’s enabled but I don’t see any error_log inside my ./public_html/ folder.

    On most cases we experience these problems while we’re setting up a Linux server with apache and php pre-installed. I have never experienced this issue before until I migrated into a cloud instance.

    The server has whm/cpanel installed but I cannot find an error_log file inside the public_html folder. Took me hours to make it work only when I found out that the solution was pretty simple. I’m still finding a way on how to make the error_log file automatically created when an error occurs.

    Anyway, here’s how I solved it.

    Firstly, make sure that error reporting is enabled and configured in your web-server. You can verify if its working by viewing the phpinfo().

    phpinfo()

    Create a file named error_log inside your public_html / www folder (this is the same directory where you put your index.php file or landing pages).

    create a file named error_log

    Add ‘read’ permission for ‘owner’ to file error_log so you can view it later.

    add permission

    Add ‘write’ permission for ‘others’ to file error_log so apache / httpd can write to it.

    add permission

    This is what your error_log should look like after you execute an ‘ls -lh’ command.

    error_log attributes

    Now, that the error_log has been created, expect it to be filled with logs once an error occurs in your application. You may view error_log contents by using either the ‘more error_log’ or ‘tail error_log’ commands.

    more error_log

    At the moment, I still have no clue why the error_log is not being auto-generated when an error occurs and when the error_log file is not present inside public_html. Based from the previous servers I handled, the error_logs have been automatically created when necessary.