Jul 27, 2014

Magento - Customize your error page by store view.

In your magento home directory you can find file/folder structure.
Magento/
  errors/
     default/
        css/
        images/
        404.phtml
        503.phtml
        page.html
        report.phtml
     404.php
     503.php
     report.php
     processor.php
     local.xml

File description and uses.
404.php       -> I guess 404 page but seems not calls when i encounter.
503.php       -> Mostly for maintenance page(check your index.php)
report.php    -> this file calls when encounter un-handle exception.
processor.php -> Main class for error handling
local.xml     -> Error Handling configuration
    404.phtml -> 404 page template
    503.phtml -> Maintenance error handin template.
    page.html -> Main page or layout of the error excemption
    report.phtml -> Exception error template

Above info is just a head up about the file/folder structure and information. Now lets assume that you have store view with store code mobile(that simplify the store is for mobile). To create custom error for your store(Store front). Best way copy the default error and name it same to your store code.
$ cd MAGENTO_PATH_DIR/errors/
$ cp default mobile

Now is time for you to customize the mobile custom error page. For this to able to use, you have to modify MAGENTO/errors/local.xml

<config>
    <skin>default</skin> <!-- Change default in to mobile-->
    <!-- Some other setting below -->
</config>

Aside from modifying your local.xml. You can also access the site with a parameter skin and is your store code.
Example: http://localhost/magento?skin=mobile
or you can modify the MAGENTO/index.php and the code before below.
<?php
$_GET['skin']='mobile'; // Add aditional parameter on every request.
Mage::run($mageRunCode, $mageRunType);
?>

Jun 26, 2014

How to setup media wiki one lighttpd.

Assume the lighttpd already installed.

Add the configuration below for settings.

#fastcgi.server = (".php" =>("localhost" =>("host"=>"127.0.0.1","port"=>"1026","bin-path"=>"/usr/bin/php-cgi")))
url.rewrite-once = (
         "^/wiki/upload/(.+)" => "/wiki/upload/$1",
#        "^/wiki/config/(.+)" => "/wiki/config/$1",
         "^/wiki/skins/(.+)" => "$0",
#        "^/$" => "/wiki/index.php",
         "^/wiki/([^?]*)(?:\?(.*))?" => "/wiki/index.php?title=$1&$2"
)
#url.rewrite-if-not-file = (
#   "^/wiki/(mw-)?config/?" => "$0",
#    "^/wiki/([^?]*)(?:\?(.*))?" => "/w/index.php?title=$1&$2",
#    "^/wiki/([^?]*)" => "/w/index.php?title=$1",
#    "^/wiki$" => "/w/index.php", # to avoid 404 when the user types /wiki instead of /wiki/
#)
#url.redirect = ( "^/(?!w|wiki|robots\.txt|favicon\.ico)(.*)" => "/wiki/$1" )
#$HTTP["remoteip"] !~ "192.168.101.156" {
#    $HTTP["url"] =~ "^/wiki" {
#      url.access-deny = ( "" )
#    }
# }

Jun 24, 2014

Mysql - ERROR 1148: The used command is not allowed with this MySQL version

This happen when you try to use the LOAD command.

How to Fixed.
* Add the --local-infile in you mysql command.
mysql -u root -pfatword test --local-infile
* Or Add the local-infile=1 in [mysql] section in your my.cnf file.
[mysql]
local-infile=1





TIPS: my.cnf commonly found in /etc/my.cnf

kdenlive: cannot find your MLT profiles

This problem commonly encounter after you update you libmlt. Normally the popup suggest the path /usr/share/mlt/profiles, but after re-install/update the mlt path will commonly become /usr/share/mlt-5/profiles and /usr/share/mlt-6/profiles. But in my case i use /usr/share/mlt-6/profiles as my profile path.