Archive

Archive for the ‘System’ Category

convert to utf8

November 8th, 2011 No comments

#/bin/bash
LIST=`find . -name *.inc`
for i in $LIST;
do iconv -c -f euc-kr -t utf8 $i -o $i.”utf8″;
mv $i.”utf8″ $i;
done

Categories: Server, System Tags:

magento upgrade

August 31st, 2011 No comments

rm -rf /var/cache session
./mage mage-setup .
./mage config-set preferred_state stable
./mage list-installed
./mage list-upgrades
./mage install http://connect20.magentocommerce.com/community Mage_All_Latest –force
./shell php indexer.php reindexall

 

app/etc/config.xml

<initStatements>SET NAMES utf8; SET FOREIGN_KEY_CHECKS=0; SET UNIQUE_CHECKS=0;</initStatements>

Categories: Programming, System, Web Tags:

magento Browse By Vs. Shop By

November 10th, 2010 No comments

Catalog Category (Non-Anchor)

<block type=”catalog/navigation” name=”catalog.leftnav” after=”currency” template=”catalog/navigation/left.phtml”/>

Catalog Category (Anchor)

<block type=”catalog/layer_view” name=”catalog.leftnav” after=”currency” template=”catalog/layer/view.phtml”/>

Categories: System Tags:

magento disappear poll after voting

November 9th, 2010 1 comment

app/code/core/Mage/Poll/Model/Poll.php

public function getVotedPollsIds()
{
$idsArray = array();
/*
foreach ($this->getCookie()->get() as $cookieName => $cookieValue) {
$pattern = ‘#^’ . preg_quote($this->_pollCookieDefaultName, ‘#’) . ‘(\d+)$#’;
$match = array();
if (preg_match($pattern, $cookieName, $match)) {
if ($match[1] != Mage::getSingleton(‘core/session’)->getJustVotedPoll()) {
$idsArray[$match[1]] = $match[1];
}
}
}

// load from db for this ip
foreach ($this->_getResource()->getVotedPollIdsByIp(Mage::helper(‘core/http’)->getRemoteAddr()) as $pollId) {
$idsArray[$pollId] = $pollId;
}*/

return $idsArray;
}

Categories: System Tags: , ,

pear mage-setup

October 21st, 2010 No comments

./pear mage-setup .
./pear install magento-core/Mage_All_Latest

Categories: System Tags: , ,

Ubuntu VM on Xen FIX: perl: warning: Setting locale failed.

July 27th, 2010 No comments

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

# locale-gen en_US en_US.UTF-8 hu_HU hu_HU.UTF-8

# dpkg-reconfigure locales

Categories: Server, System Tags: ,

Replace blank space in file name

July 8th, 2010 No comments

for f in *; do mv “$f” `echo $f | tr ‘ ‘ ‘_’`; done

Categories: Programming, System Tags: ,

Server Configuration Job Log

December 13th, 2009 No comments

Dell PowerEdge  SC1420

Dell CERC SATA 1.5/6ch RAID Controller

Windows 2003 / MS SQL 2005 / Accpac ERP

IMG_0506

1. Upgrade system BIOS, raid controller firmware on windows 2003

2. Attach a new hard disk and configure raid 0, virtual drive #1

3. Move all data on current D drive to new attached drive

4. Back up C partition as a image: Clonezilla

5. Reconfigure hard disk 1 & 2 as raid 1, virtual drive #0

6. Restore backed up C drive image to new reconfigured virtual drive #0

Categories: Server, System Tags: , , ,

Linux Server Monitoring Tools

November 4th, 2009 No comments

- Network Monitoring
tcptrack
iptraf

- CPU, Memory Monitoring
top
free

- Disk I/O Monitoring
iostat(sysstat)

Categories: Server, System Tags: , , ,

Mount LVM disk

September 1st, 2009 No comments

#apt-get install lvm2

#pvscan
PV /dev/sdb1 VG server-roma lvm2 [136.49 GB / 0 free]
Total: 1 [136.49 GB] / in use: 1 [136.49 GB] / in no VG: 0 [0 ]

#vgscan
Reading all physical volumes. This may take a while…
Found volume group “server-roma” using metadata type lvm2

#vgchange -a y
2 logical volume(s) in volume group “server-roma” now active

#lvscan
ACTIVE ‘/dev/server-roma/root’ [130.91 GB] inherit
ACTIVE ‘/dev/server-roma/swap_1′ [5.58 GB] inherit

#mount /dev/server-roma/root /mnt

Categories: Server, System Tags: , , , ,