Sunday, May 26, 2013

Monday, December 24, 2012

install php mysql on ubuntu

http://www.developmentwall.com/install-apache-php-mysql-phpmyadmin-ubuntu/

Thursday, November 24, 2011

Retained Earning (Laba Ditahan) di OpenERP

Bismillah,

In process to blogging and sharing my knowledge in OpenERP.
Start with posting about getting retained earning for Balance Sheet Report in OpenERP..

Chek this out...
http://berbagiopenerp.blogspot.com/2011/11/retained-earning-laba-ditahan-di.html

Monday, November 21, 2011

show products on magento homepage

Bismillahirrahmaanirrahiim..

okay, I'm starting to seriously manage my own provate project that is create an online store.
After, browsing, asking etc I found magento as the best free online store I found.
the important thing is it has a good free templates hehe...

the most difficult is how to show products on magento home page.
I thought it should be default, but it is not.

After searching some documentation, I found this good link http://vimeo.com/1070986
So, simple.
1. Create product category (set active as no). It just to collect all products to show up in home page
2. Create products and set category to your home page category
3. Update attributes of products and set it to show in main website
4. Make sure you have update inventory of that product
5. Set up cms homepage content. Add this block:
{{block type="catalog/product_list" category_id="10" template="catalog/product/list.phtml"}}  
Change category_id to number ID that can you see in category management
example:

Full (ID: 10) 

So category_id is 10


that is...
hope this help

Wednesday, November 16, 2011

enable remote access PostgreSQL in Windows

Bismillah...

So, in my current office I am not using Ubuntu more...
I have to use Windows server 2008 as my application server.

Just same when I use Ubuntu...  I should learn from zera how to maintain a server... haha
okay... back to the topic...

I installer PostgreSQL 8.4 on server
and want that database can be accessed remotely...

In ubuntu the steps is easy like my post before enable-remote-access-postgresql
In windows the steps are same, which are
- edit pg_hba.conf
- edit postgresql.conf
- restart server

OKay... it easy but I always failed...
Why?
Because I was totally wrong placing file pg_hba.conf and postgresql.conf
I placed them on root of postgre folder
because some blog said that...

then, after read this blog http://developer.postgresql.org/pgdocs/postgres/auth-pg-hba-conf.html
I just knew that it should be placed on data dictionary...

It just I place data dictionary in "D" space not "C"
so, I didnt realize that folder...

pfiuuhh....

Ohya don't forget to add New Line in last line of file pg_hba.conf

Hope this help...

Wednesday, June 22, 2011

[openerp] The modules menu is missing!!

Bismillah...

what a shock, that I couldn't found modules menu on menu administration in openerp although I've login as administrator...
That menu is very important to install update new modules...

Then I gugling, and found a very simple solution..
that is switch your interface mode from simplified to be extended.

Just it!

Hope this help :D

Monday, June 20, 2011

[openerp] ZipImportError: bad local file header in pathtozipfile.zip

Bismillahirrahmaanirrahiim...

Today I just learned how to create a simple module in openerp...
I read this sources:

  1. http://www.ibcscorp.com/application-integration-customization/erp/openerp-2/openerp-custom-module-development-quick-start-guide/
  2. http://imsciences.edu.pk/serg/2010/09/openerp-module-development-part-1/
There are some different method from that two sources:
  1. The first source using file named __openerp__.py as module descriptor file, but the 2nd source using file named __terp__.py
    I don't why they using different file name... I will find out later
  2. the first source says that we should zip folder as modulename.zip then instal to openerp through menu administration/import module,
    but the 2nd source says that we just put the folder into folder openerpserver/addons but dont know the next procedure
So, I have try the first source and it was install successfully..
then I tried the 2nd source but with 1st source method to install the module.
  1. Zip the module
  2. Go to menu administration/modules/import module
  3. attach the zip file
  4. go to menu modules
  5. search module name I created
  6. click schedule for installation
  7. apply schedule upgrades
but it raises error such these:
openerp ZipImportError: bad local file header in pathtofile.zip

I search in google and founf this answer (http://www.openerp.com/forum/topic15598.html)
in server, unzip student_info.zip in addons/student_info (but warning, you do not have addons/student_info/student_info)
in client go to administration->modules, update list of modules, install your module.
If you use dia to build your modules, or generally, unzip it in addons before, and update list of modules.

SO, the solution is:
  1. cancelling the installation of module
  2. unzip the modulename.zip in openerpserver/addons/
  3. remove modulname.zip file
  4. click menu administration/modules/update modules list
  5. search for my modulname
  6. schedule for installation
  7. apply schedule upgrades
then I can see the real error,
I fix it directly in openerpserver/addons/modulename
then I click apply schedule upgrades until success information appear

btw, the 2nd source will make you dizzy
because we will found some error when implemented that...
it just because different text fonts when you use quotes and double quotes
and there a line missing in sim.py
which is:
from osv import osv, fields
in first line

Hope this help

[python] NameError: name 'self' is not defined

Bismillah..

I'm currentlt learning about python..
I take this web as my guide.
http://www.sthurlow.com/python/

then in lesson 8 which i learn about how to create class i got problem...

Traceback (most recent call last):
File "D:/workspace/openerp/sourcecode/phython/lesson8class.py", line 1, in ?
class Shape:
File "D:/workspace/openerp/sourcecode/phython/lesson8class.py", line 17, in Shape
self.y = self.y * scale
NameError: name 'self' is not defined

I gugling... and found these simple answer in this link http://stackoverflow.com/questions/2963654/python-nameerror-self-is-not-defined:

The exception is happening while the class is being defined, which means that your indentation is off. Tabs in Python are equivalent to 8 spaces, so if all the preceding lines are using tabs and your tabstop is set to 4 spaces then the indentation only looks correct.


wuihihi... so make sure you use the correct IDE :D

Wednesday, February 09, 2011

install sun-java on lucid

Bismillahirrahmaanirrahiim

lagi2 .. ini hal yang sering aku cari tapi sering lupa
lagi2 buru2 yaa...

package java default di lucid lynx 10.04 adalah openjdk
tapi, beberapa installer tidak bisa comply dengan openjdk tsb..
jadi musti pake sun-java

karena itu, langkahnya adalah:
edit file /etc/apt/sources.list

tambahkan:
deb http://archive.canonical.com/ lucid partner

lalu sudo apt-get update
baru deh cek aja:
sudo apt-cache search java

bisa terlihat sejumlah package yang depannya sun-java

SO, selamat menginstallll

libkrb53 1.6.dfsg.2

Bismillah

langsung aja ya, karena buru2 nih nulisnya.
Awalnya aku mau install postgresql-8.2 di PC dengan ubuntu 10.04 lucid lynx 32bit.
karena gak ada package nya.. kebetulan aku udah download manual package2 yang bersesuaian.

jadi, yang dilakukan adalah:
# sudo dpkg -i postgresql-client-common_87_all.deb
# sudo dpkg -i postgresql-common_87_all.deb
# sudo dpkg -i postgresql-client-8.2_8.2.7-1_i386.deb
# sudo dpkg -i libpq5_8.3.8-0ubuntu8.04_i386.deb
# sudo dpkg -i postgresql-8.2_8.2.7-1_i386.deb

eh di step terakhir malah muncul error yang intinya ada dependensi ke libkrb53 (>=1.6.dfsg.2)

dicari2 muter2 gk nemu tuh package..
ternyata itu salah satu bugs...

dapet solusi sementara spt di:
https://bugs.launchpad.net/ubuntu/+source/root-system/+bug/462059
(lihat di comment #6)

intinya buat libkrb53 palsu dengan
buat file misal krb.txt

yang isinya:

Package: libkrb53
Version: 1.6.dfsg.2+fake1
Depends: libkrb5-3, libgssapi-krb5-2, libk5crypto3, libkrb5support0

lalu jalankan dengan equivs

sudo equivs-build krb.txt

*install dulu package equivs yang juga belibet

akhirnya ke-generate file: libkrb53_1.6.dfsg.2+fake1_all.deb

baru deh jalanin
sudo dpkg -i libkrb53_1.6.dfsg.2+fake1_all.deb

baru deh lancar jalankan :
# sudo dpkg -i postgresql-8.2_8.2.7-1_i386.deb

Semoga membantu :)

Friday, October 29, 2010

Monday, June 28, 2010

install 2 versions postgre (8.2 dan 8.3)

Ahhh saya lagi malas berbahasa Inggriss....
jadi awalnya ada kebutuhan utk install postgre 8.3 karena aplikasi yg mau kuinstall
mewajibkan minimum req postgre 8.3
Sedangkan di laptopku dengan OS Ubuntu 9.04 - the Jaunty Jackalope sudah terinstall postgre-8.2 dan gak mungkin diunsintal karena ada aplikasi yang sudah ditetapkan pakai 8.2 dan malas sekali aku upgrade aplikasi tsb... hehe..
So, akhirnya tanya ke sana ke mari... (thanks to mas toni sutomo and pak reza primardiansyah yg dah kasih solusi)

so, ternyata gampang ajah tinggal instal lagi aja version 8.3 nya spt biasa dengan apt...
# apt-get install postgresql-8.3

kalo 8.2 dulu installnya download paket2nya secara manual, karena paket di ubuntu 9.04 secara default adalah 8.3..

terus bedain deh portnya..
karena yg pertama kali diinstal adalah 8.2 dengan default port 5432, maka yg harus diubah portnya adalah yg version 8.3
yaitu dengan edit file: /etc/postgresql/8.3/main/postgresql.conf
edit bagian ini:
port = 5432 # (change requires restart)
ubah aja jadi 5433
terus restart dah...

terus utk pakai psqlnya...
defaultnya kalo jalankan psql akan masuk ke sever 8.2 dengan port 5432
utk menggunakan psql utk versi 8.3
jalankan:
/usr/lib/postgresql/8.3/bin/psql (bikin aja symlink utk langsung akses ini)

nah ternyata biarpun sudah pakai psql versi 8.3 dia akan tetap akses server postgre versi 8.2
oleh karena itu tampbahkan paramter portnya...
/usr/lib/postgresql/8.3/bin/psql -p 5433
baru deh bisa akses server 8.3

as simple as that..........
^o^

Saturday, June 06, 2009

Kernel panic-not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Last afternoon, I asked my friend to reinstall my ubuntu with Ubuntu9.04..
Installation process was succeed... but when I try to re login to this laptop, I've got an error information that make me being panic successfully... which is:
Kernel panic-not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Whuaaa... I could't enter to ubuntu desktop, I could't enter to bash terminal. I could't do anything, just press F12 or Esc, F2 then nothing. What should I do??
I ask my friend about this error, and he couldn't do anything, because Internet was out of reach. How about me? I also couldn't access internet without this laptop. Then he tell me to use Live CD, so I can access internet and try to fix the problem.
Thanks God, I bring my flash disk which Kubuntu Live OS already placed in.

Okay, I can access internet successfully, I have a chance to repair the problem with that Kubuntu. Found many variation of solution on google (fiuuh I love google =P).
I confused. But, I have found one BIG clue... that I shoud do "chroot", "apt-get update", and "apt-get upgrade".

I see on Nautilus, that there still 3 partition of hardisk. Of course one of them is filesystem partition.
Then from one of ubuntuforum( I'm sorry, I do really forget to save the link), it told me to do mounting filesystem, just by click that partition on Nautilus.

So, what I did is:
  • click filesytem partition, so it mounted to /media/disk (depend on system)
  • do chroot on terminal by typing:
    #sudo chroot /media/disk
  • Do apt-get update
    #sudo apt-get update
The last step, working on the middle, but suddenly stopped and raise an error:
Could not set non-blocking flag Bad file descriptor
E: Method http has died unexpectedly!

Whuaaa.... whats wrong?
Then I chat to my friend who I know that he really smart and familiar witu ubuntu. He said, that mounting process I've done haven't completed yet. I should did these three steps before do chroot:

# sudo mount -t proc proc /media/disk/proc
# sudo mount -t sysfs sysfs /media/disk/sys
# sudo mount -o bind /dev /media/disk/dev

So, what I've done are:
  • click filesytem partition, so it mounted to /media/disk
  • finisihing mounting:
    # sudo mount -t proc proc /media/disk/proc
    # sudo mount -t sysfs sysfs /media/disk/sys
    # sudo mount -o bind /dev /media/disk/dev
  • do chroot on terminal by typing:
    #sudo chroot /media/disk
  • Do apt-get update
    #sudo apt-get update
    Yeiiyyy it worked... apt-get update run smoothly
  • Continue to do apt-get upgrade
    #sudo apt-get upgrade
    Yes it also worked... ALhamdulillah
Then I restarted the PC, and still got error but with different context which is:
/sbin/unsplash_write: not found
and ask me to insert command on initrampfs shell... that I have no any idea what is that..

Then I remember, that one of solution on ubuntuforum told me to do update-initramfs.
So, I back to use Live OS ... do this command:
  • click filesytem partition, so it mounted to /media/disk
  • finisihing mounting:
    # sudo mount -t proc proc /media/disk/proc
    # sudo mount -t sysfs sysfs /media/disk/sys
    # sudo mount -o bind /dev /media/disk/dev
  • do chroot on terminal by typing:
    #sudo chroot /media/disk
  • update inintramfs
    #update-initramfs -c
Restart the PC, and Alhamdulillah I can enter into ununtu desktop successfully..

So, the steps are:
  • click filesytem partition, so it mounted to /media/disk
  • finisihing mounting:
    # sudo mount -t proc proc /media/disk/proc
    # sudo mount -t sysfs sysfs /media/disk/sys
    # sudo mount -o bind /dev /media/disk/dev
  • do chroot on terminal by typing:
    #sudo chroot /media/disk
  • update inintramfs
    #update-initramfs -c
  • Do apt-get update
    #sudo apt-get update
    Yeiiyyy it worked... apt-get update run smoothly
  • Continue to do apt-get upgrade
    #sudo apt-get upgrade
Thanks to Ichsan, Iyang, Google ans also Allah S.W.T

Thursday, June 04, 2009

permisson - binary - etc

Because I'm too lazy to rewrite this topic. So, I just copy the conversation between me and my friend about how to config permission on Linux.

09:09 me: ichsan... kalau ngatur permission spya bisa solve masalah ini, gimana ya?
2009-06-04 09:12:05 WIT DETAIL: File must be owned by the database user or root, must have no write permission for "group", and must have no permissions for "other".
Muhammad: Ubah permissionnya
09:10 chmod
me: nah iya chmod ** berapa ?
09:11 Muhammad: chmod itu terdiri atas: rwxrwxrwx. Masing2 groupnya adalah: user group other
own itu harus pake chown
chown filenya
09:14 me: gini dah
09:15 gimana cara supaya permission-nya: -rw-r-----
Muhammad: rwx itu adalah biner 111
09:16 111 artinya 7
chmod 777 file, artinya:...
?
09:17 me: kalo itu si bisa diakses siapapun
Muhammad: Nah, silahkan disesuaikan
selamat mencoba!
me: kalo rw=110 gitu?
09:18 Muhammad: ya
110 itu kan biner
me: berarti 640
gitu bukan?
Muhammad: 110 != 640 oi
110 itu artinya 6
09:19 me: iya
maksud gw kalo gw mau spt ini:
-rw-r-----
jadinya 640 bukan?
Muhammad: betul
me: yeeiyyyy
hehe gw lupa pelajaran gitu2an
:P
09:20 Muhammad: Itu penting banget di Lniux
ilmu terdasar
09:23 me: baiklah baiklah saya mengerti
09:24 Muhammad: wasurenaide ne
(don't forget)
09:25 me: insyaAllah

Saturday, May 09, 2009

Lowongan guru happy n smart

Dibutuhkan SEGERA!
Guru Matematika, FIsika, Kimia, Bahasa Inggris untuk
SD, SMP & SMU.


Persyaratan:
  • Minimum S1 berpengalaman
  • Domisili Bekasi, diutamakan Bekasi Timur dan Barat
Lamaran dikirim langsung ke:
HAPPY n SMART via pos ke:
Perum Narogong Indah Jl. Narogong Elok VIII
Blok C9 No. 10 Pengasinan Rawa lumbu Bekasi 17115.

atau via email ke:
muhammadtaufiq80@yahoo.com
telp: 95126446 - 08176662010

Friday, November 07, 2008

SSH without password

Yes, it less of security. but I really need it when I want to doing automatic database backup to other computer in each time I turn on my computer.

Then, I got this link. Linkhttp://lqman.wordpress.com/2008/08/29/ssh-tanpa-password/
I try it, and it worked..

the steps are below:
in example we want doing SSH from mawaddah to prita. So, in mawaddah type the command below in terminal

==================================================
mawaddah@mawaddah-laptop:~$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/mawaddah/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/mawaddah/.ssh/id_rsa.
Your public key has been saved in /home/mawaddah/.ssh/id_rsa.pub.
The key fingerprint is:
c1:8d:d4:d7:4a:b0:58:1b:2d:7f:9f:37:dd:9c:6f:fa mawaddah@mawaddah-laptop

mawaddah@mawaddah-laptop:~$ ssh-copy-id -i .ssh/id_rsa prita@192.168.1.246
prita@192.168.1.246's password:
Now try logging into the machine, with "ssh 'prita@192.168.1.246'", and check in:

.ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.

mawaddah@mawaddah-laptop:~$ ssh prita@192.168.1.246
Linux prita 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
Last login: Fri Nov 7 10:44:46 2008 from mawaddah-laptop.local
prita@prita:~

============================================================

Finish........
thanks for Mr. Luqman

Monday, October 27, 2008

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

I'm currently using lampp-1.6.6 as my php/mysql server in my ubuntu 7.10.

It's very easy to use.. especially when I want to use mysql database server. I just go to their phpmyadmin to create database, import, view, insert, etc..

But the lack is when I want to using import facilities..it has maximum file size to uploaded, that is 2,048 KiB

So, what I must to do when I have to import more that 2MB file size is using mysql from terminal/console..

It seems simply to just use this command:
# mysql -u [username] -p [password] [database_to_restore] < [backupfile]

but it always returned this error:

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

what's wrong...??

I search in google to find out if there anyone have the same problem like I have...

yes there are so many people have that problem..


I try one by one solution they recommended but it still fail..

Then, I go to directory /opt/lampp-1.6.6/bin
then I repeat my command one more time.. but it still failed..

Then I change the command just to add ./ that is:
# ./mysql -u [username] -p [password] [database_to_restore] < [backupfile]

then it worked???

My analysis is when I type command:
# mysql -u [username] -p [password] [database_to_restore] < [backupfile]

without "./" it will refer to default mysql server which it not currently installed.

SO, of course it will failed...

Bu when I added "./" and I do that in lampp directory it will refering to mysql in lampp..

Hmm I don't know yet how to make mysql in lampp being default mysql database server

Saturday, October 18, 2008

Sony Ericsson w200i GPRS Telkomsel Modem in Ubuntu

Basically I just want to maximize the functionality of my cell phone Sony Ericsson w200i which I bought in last March. Yes I have that pc suite for windows OS. But unfortunately, i'm using Ubuntu in my (office) laptop.
SO, I asked to Mr Google and I got this blog
In my first trial, it tutorial could'nt worked for my cell phone. I don't know why, maybe I just make a mistake in entry the phone number or etc.
Then I remember that my friend had ever successfully using my cell phone as modem in a PC Ubuntu. But, I just forgot to asked him how to do that.
Then I try to find in his blog and finally I got a complete but simple step to do that.

Here, I rewrite its steps:
1. Plug the USB Cable of your Sony Ericsson w200i (sew200i) and choose phone mode
2. Of course make sure that your phone still credit on it.
3. Make sure that phone detected in your PC with doing this command in your terminal

mawaddah@mawaddah-laptop:~$ lsusb
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 002 Device 003: ID 062a:0000 Creative Labs Optical Mouse
Bus 002 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 001 Device 002: ID 0fce:d090 Sony Ericsson Mobile Communications AB
Bus 001 Device 001: ID 0000:0000


You can see that device "Sony Ericsson Mobile Communications AB" has been connected

4. Do automatically configuration with this command

mawaddah@mawaddah-laptop:~$ sudo wvdialconf


which will resulting in last line like this:

Found an USB modem on /dev/ttyACM0.
Modem configuration written to /etc/wvdial.conf.
ttyACM0: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
ttyACM1: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"


5. Command in no 4 will also creating configuration file wvdial.conf in /etc/
Adjusting that file to needs your gprs spesification.
mawaddah@mawaddah-laptop:~$ sudo vi /etc/wvdial.conf

For telkomsel use this configuration:
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
ISDN = 0
New PPPD = yes
Phone = *99#
Modem = /dev/ttyACM0
Username = wap
Password = wap123
Baud = 460800

Just make sure you enter the username, password and phone with the valid configuration.


6. Dialing with this command
mawaddah@mawaddah-laptop:~$ sudo wvdial

with that command will resulting this line in the end:
WvDial<*1>: local IP address 114.121.151.189
WvDial<*1>: pppd: ��[06][08]��[06][08]
WvDial<*1>: remote IP address 10.64.64.64
WvDial<*1>: pppd: ��[06][08]��[06][08]
WvDial<*1>: primary DNS address 202.3.208.10
WvDial<*1>: pppd: ��[06][08]��[06][08]
WvDial<*1>: secondary DNS address 202.3.210.10
WvDial<*1>: pppd: ��[06][08]��[06][08]


7. Then your cell phone will give you information that you have been connected to internet.
Just try to test with doing ping
mawaddah@mawaddah-laptop:~$ ping www.google.com
PING www.l.google.com (74.125.95.104) 56(84) bytes of data.
64 bytes from iw-in-f104.google.com (74.125.95.104): icmp_seq=1 ttl=242 time=774 ms
64 bytes from iw-in-f104.google.com (74.125.95.104): icmp_seq=2 ttl=242 time=853 ms
64 bytes from iw-in-f104.google.com (74.125.95.104): icmp_seq=3 ttl=242 time=777 ms
64 bytes from iw-in-f104.google.com (74.125.95.104): icmp_seq=4 ttl=242 time=873 ms



Yeahh... it worked...
But unfortunately tariff of telkomsel gprs still expensive Rp.5/KB
So, when I just open this blog, my friend blog, YM, and my office webmail in just shorttime. It has use Rp.11.385 for 2.277KB...
I'm bankrupt..... :((

Ohyaa, btw I try one more time the steps ini this blog.
Then it worked...

So, thanks for this blog and my friend

Tuesday, October 14, 2008

enable remote access PostgreSQL

In default, for security reason, postgreSQL doesn't allow to be accessed remoted.
But, we can configure it so it can be accessed remotely.

Below is the step to do that with follow the steps I done with postgreSQL8.2 in Ubuntu OS
1. Login as postgres
# su - postgres
2. edit configuration file (pg_hba.conf)
# vi /etc/postgresql/8.2/main/pg_hba.conf
append below line to that file:
host all all 192.168.1.0/24 trust

where 192.168.1.0 is IP configuration in your network
3. edit configuration file: postgresql.conf to allow TCP/IP socket
# vi /etc/postgresql/8.2/main/postgresql.conf
find line:
listen_addresses='localhost'
and change into
:
listen_addresses='*'


4. restart postgreSQl with:
# /etc/init.d/postgresql-8.2 restart

Finisih

openbravo