Eclipse Ganymede and WSCompile incompatibility?
I found strange problem with WSCompile-1.6 task in Ganymede release of Eclipse (Version 3.4.1). The problem lies in WSCompile-Ant-Task. Buildscript execution freezes on the wscompile task. I describe that problem more detailed on techjava.de Please feel free to comment here or there if you know what died changed in Ganymede in ant scripts handling since Europe release and how to fix it.Extracting tar, gzip, bzip2, z
Sometimes you need to extract some files on Linux console. Here some examples how to do that.
tar
Tar archives are the most common way of distributing bundles of files under Linux or UNIX. A .tar file is simply a bundle of files packaged with GNU tar program. To extract such files use following:tar xf somearchive.tar tar xvf somearchive.tar
- Provide option f if you want to extract content of files. Tar (from tape archive) has long history and was intended to work with tape media, so when you omit f tar tries to work with tape device.
- v- stands for verbose. List all the files by extract process.
- x- Extract command
tar tf archive.tarFor more tar parameters see Man pages.
gzip
Often tar-files are also compressed. One of the most known compressed formats is GNU Zip (gzip). Tar bundeld and zipped file would normally have extension .tar.gz. To extract such files you can use tar with “z” option, which causes tar to automatically invoke gzip. Modify abow example and you get able to extract tar.gz files too.tar -xzf somearchive.tar.gzIn old tar version the “z” option is may be not available. In that case just use UNIX pipes:
gzip -dc target.tar.gz | tar xf -Meaning of gzip options
- d - Do decompress!
- c - write to console (So that tar can take it from there )
- t - Tests file integrity
- l - lists archive file information
bzip2
Sometimes you can find files ending with .tar.bz2. That are files packaged with bzip (a block-sorting file compressor). Use it like gzipbzip2 -dc target.tar.gz | tar xf -Options d,c,t have the same meaning. More on Man pages.
zcat
Some files have .tar.Z endings. They can be extracted byzcat somearchive.tar.Z | tar xf -Look in Man pages for more. Any questions? You are welcome to comment!
How to duplicate magento installation
In this article I explain how to create a copy of running Magento online shop . One of purposes of having duplicates is e.g. the need of developing or test environment. Test are very inmportant in magento. Many people do official Magento upgrades on productive environments and suffer form it. You don’t need to do so, use always test environment first!
However the copy procces of Magento shop has following main steps
- duplication of database schema
- duplication of core sources
- duplication of downloader sources
Database
First, let me say say, that it is good idea to not install two Magento instances to the same database. Magento in version 1.1.8 s has 198 database tables. Most of them are of type InnoDB and they are related with each other by checked foreign key constraints. That is background information.
So new database for every Magento instance save you from having headaches and this not only because having just two magento installation i one DB leads too approx. 400 tables in one database but more to avoid possible problems or side effects with constraints and Co. (e.g. ) . ;).
The easiest way to export the database is to use phpMyAdmin. Go to export dialog of original database, select “zipped” option, select tabbles, let other options on their defaults (See screen 1) and get zipped download. Switch to new database and upload the downloaded there in the import dialog.
Sound as a piece of cake, but sometimes the import of the SQL files will not work. I have already seen many different exceptions bu trying. Beginning with “SQL Syntax..” and ending with “constraint violation…”. In my opinion the purpose of problems is size of some tables and therefore of whole backup. There are few MyISAM tables that are full with (useless) log data. And the amount of this data makes problems to the import routine. Don’t export them first at time! they don’t have any constraint to other tables so you can import them on second or third turn. Alternative you can export only the DDL-Statement of this table not the data itself.
Here are tables you can omit in first step:
- log_url
- log_url_info
- log_visitor
- log_visitor_info
Core Sources
That is most easiest part. Just copy the source of magento to the new location, but don’t copy the following:- downloader dir
- any content of dirs inside of var but .htacces file.
- media/tmp dir
Magento Downloader
Warning! do not copy unchanged downloader to new location on the same server it may break your origin magento installation! Now I got your attention
//shows all files with OLD_PATH element
find . -type f -exec grep -q "OLD_PATH" '{}' \; -print
//Replaces OLD_PATH string in all occurrences in every file to NEW_PATH
find . -type f -print | xargs sed -i -e ’s/OLD_PATH/NEW_PATH/g’
If you have only ftp access, then you can use [Alt+F7]-search in Total Commander. Then open each file with Notepad++ and then use “Search and Replace” functionality of Notepad++ on each file. Whole replacement willtake you max. 5 minutes.
After replacing old path you can upload downloader to the new instance of Magento.
Now everything including “Magento Connect” should work properly and independent form each othen on thow instances. The last thing my be useful is to clear all caches in admin back-end of new instance. Good luck! Open Question
This article describes how to double the Magento instance once. The next question which i didn’t answered for me yet is how to make permanent mirroring of data from production environment to the test installation. Maybe someone has cool ideas?Disclaimer
Please consider that I can’t guarantee that everything described here will work in your environment as it worked for me. Please use this tutorial as incitement and adopt my methods to your own situation. Be sure that you don’t peril origin Magento installation or other data. Do regular backup befor you begin!Best related post plugin
Today I found very cool related post Plug-in which I want to share with you - dear Wordpress Blogger! The name of that plug-in is Microkid’s Related posts and I already like it much!
It differs from other “Related posts”-plug-ins, which are based on automatic content analysis. What ever the content analysis algorithms are and how ever the configuration options used, resulting related post lists are mostly just a bullsh$%. That’s is understandably, then these plug-ins have same problem like search engines and other content analysis tools . In the reality of our age (It is 2009 A.D.) - computers cannnot understand any semantic of human written articles.
So what is the solution for an good Related Post Plugin? Of cause simple to do it manually!
You say it much work? No!, with Micrkid’s Related posts Plugin, which provides very comfortable AJAX driven interface, it becomes fun! It’s becomes so easy and quick as providing tags. You decide what is related to the actual post by creating meaningful related post list. Try it out!
About Russians

Vyacheslav Nikonov
Polja switched too.
Now Polja’s blog has also completely moved from holbreich.de to holbreich.org. I mean of cause I did it for her, like I . Enjoy her blog!Cool Picture on Ice
Isn’t it? I took it with my Canon 450D on the frozen sea near my home.
The whole set for interested in photography.
New Theme!

Shuron's Letters



