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"=>"","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"] !~ "" {
#    $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.

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.

Opensuse - KDENLIVE not working on on MPEG file.

KDENLIVE avformat module(FFmpeg) not working.
Opensuse version - 12.3

Root of problem:

libmlt5 has no avformat.


Update libmlt5 to libmlt6

Updating libmlt

* Add Packman repositories.
zypper ar -f -n packman-essentials http://packman.inode.at/suse/openSUSE_12.3/Essentials/ Packman-Essentials
zypper ar -f -n packman-multimedia http://packman.inode.at/suse/openSUSE_12.3/Multimedia/ Packman-Multimedia
Since Im using openSuse 12.3, above urls put as example. However if your not using same as mine, you can check the specific url for system here.

* Open YAST ans search libmlt6. While attempting to install ibmlt6 expect a prompt/comfimation to install libmlt6 and uninstall libmlt5.

After you updated libmlt to libmlt6, i suggest to reboot your system to fully reload any possible services that was affected. And if your encounter kdenlive: cannot find your MLT profiles follow the links.

Jun 11, 2014

Magento - Adding existing product to new category via SQL

Most the time you edit the the product to assign the category or edit category and assign the products. Since magento admin is some too small on thousand product of catalog. Adding via SQL Query will faster to assigned.

Adding the Product into a category
catalog_category_product(category_id, product_id,position ) 

Adding the Product to webstore
INSERT INTO catalog_category_product_index(
    48, -- CategoryID 
    85545, -- Product ID
    1, -- Posistion Normaly 1(1)
    1, -- Parent category ID
    3, -- Store ID
    4, -- Visibility