9/12/2009

mod_dphpbb3_last_topics php warnings

 

Today after installing such pretty tool as  mod_dphpbb3_last_topics I received a ton of such errors

Warning: cannot yet handle MBCS in html_entity_decode()! in helper.php in line 130

After googling I found this article. I tried to replace:

$title = html_entity_decode($title, ENT_QUOTES, 'UTF-8'); with $title = utf8_decode($title);

but it brakes UA/RUS lang. After brainstorm I made following changes in code:

Was:

$title = html_entity_decode($title, ENT_QUOTES, 'UTF-8');

Become:

$title = html_entity_decode($title);

9/03/2009

pf changes

List:       openbsd-misc
Subject: pf changes
From: Henning Brauer
Date: 2009-09-01 15:12:37
Message-ID: 20090901151237.GA11326 () nudo ! bsws ! de

[Download message RAW]


I have just committed a monster pf diff that is basically a rewrite of
the entire NAT part.

seperate rules for nat, rdr etc are gone.

nat and rdr become actions on regular rules.

simple rulesets are converted like this:

nat on $ext_if to ($ext_if)
becomes
match out on $ext-if nat-to ($ext_if)

more complex rulesets require some thought. since the weird
difference in matching order is gone (nat/rdr were first match) you
might have to reverse things and use your brains :)

the new NAT code is very very very flexible. every matching "match"
rule changes the adress on the fly (not really, but that is what it
looks like for subsequent rules), and you can nat or rdr multiple times.
for pass rules, only the last matching one matters.

so given
match out on $ext_if nat-to 1.2.3.4
match out on $ext_if to 1.2.3.4 nat-to 5.6.7.8
both rules will match and 5.6.7.8 will be the new src address.
however, with
pass out on $ext_if nat-to 1.2.3.4
pass out on $ext_if nat-to 5.6.7.8
ONLY the second one matters for NAT. same semantic that match rules
have for a lot of other stuff (altq, rtable, log, scrub).

the core logic, that relies on the big state table rewrite ryan and I
(with help from otehr developers of course) did last year, allows for
nat and rdr in any direction, but for now we prevent that in pfctl and
force nat outbound and rdr inbound, there are nontrivial implications
for the routing afterwards - if you rdr outbound, the packet will go
out on the interface it was seen on, even if the route for the address
rdr'd to actually points to a different interface. with NAT there are
similiar implications for the return traffic. since they are useful
nontheless I tend to remove the check in pfctl and document the
implications, but one thing after each other.

the diff is over 3000 lines, and makes pf about 800 lines smaller
than it was before. more cleanup is possible on top of this, but as
said before, one step at a time.

to add another data point how important hackathons are... this was
almost entirely written at c2k9 in edmonton and "finished" (minus a
few bugs fixed later) the week thereafter on bob's couch. while the
diff was almost entirely written by me, getting this actually into the
tree was a concerted effort by many developers. claudio adjusted ftp-proxy,
sthen ported that adjustment over to tftp-proxy, reyk adjusted relayd.
many people were testing a lot, I'm sure I forget a few, but at least
krw, sthen, claudio, reyk, dhill and dlg (who was insane enough to
throw this on production firewalls with significant importance) helped
a lot. igor did most of the manpage work. theo helped getting it in, a
lot. thanks guys.

and now it is your time. test this as much as you can, to avoid
surprises in 4.7, and bugs showing up after release... we really want
to find them beforehands, right?

henning

--
Henning Brauer, hb@bsws.de, henning@openbsd.org
BS Web Services, http://bsws.de
Full-Service ISP - Secure Hosting, Mail and DNS Services
Dedicated Servers, Rootservers, Application Hosting - Hamburg & Amsterdam

http://marc.info/?l=openbsd-misc&m=125181847818600&w=2

8/24/2009

Add favicon to joomla 1.5 site

 

  1. login into admin section
  2. go to template management
  3. upload favicon into  image folder of your site
  4. edit HTML of your tamplate
  5. add following code:

<link rel="shortcut icon" href="images/favicon.ico" />

6. refresh your browser.

Have fun :)

8/20/2009

Встановлення Xen на Debian Etch 4.0

Основна стаття http://mediakey.dk/~cc/installing-xen-on-debian-etch-40/
Переклад Михайло "veselujm" Веселовський

Протягом довгого часу я випробуав багато технологій віртуалізації: Xen, VMWare, і Xen LogoMicrosoft VM. Я з впевненістю можу сказати що всі вони придатні для використання, але VMWare і Microsoft’s VM є більш вялими ніж Xen. Цих вихідних я розгорнув свій перший сервер на базі Debian Etch 4.0 і Xen. І все запрацювало з "коробки"

Тут я опишу кроки які я зробив щоб поставити Xen на Debian Etch:

sudo apt-get install xen-linux-system-2.6.18-4-xen-686 libc6-xen bridge-utils


Грузимось в нове ядро з встановленим Xen

sudo reboot


Потім настроюємо настройки мережі в
/etc/xen/xend-config.sxp. Вмикаємо network bridge:

(network-script network-bridge)


Встановлюю
xen-tools:

apt-get install xen-tools


Xen tools це пакет який включає в себе різноманітні утиліти для Xen, утиліта для створення віртуальних машин тощо.

Редагуємо настройки ядра і initrd в /etc/xen-tools/xen-tools.conf, так щоб вони були подібними до ваших системних.

Взнаємо як ядро і initrd називаються у вашій системі:

ls /boot/vmlinuz*
/boot/vmlinuz-2.6.18-4-686 /boot/vmlinuz-2.6.18-4-xen-686

і

ls /boot/initrd*
/boot/initrd.img-2.6.18-4-686 /boot/initrd.img-2.6.18-4-686.bak /boot/initrd.img-2.6.18-4-xen-686


Змінюємо рядки:


#
# Default kernel and ramdisk to use for the virtual servers
#
kernel = /boot/vmlinuz-2.6.18-4-xen-686
initrd = /boot/initrd.img-2.6.18-4-xen-686


В наступному кроці змінюємо наступні рядки в xen-tools.conf


dir = /home/xen
debootstrap = 1
size = 4Gb # Розмір диску
memory = 128Mb # Память
swap = 128Mb # Своп
fs = ext3 # використовувати файлову систему EXT3 для створення дисків
dist = etch # Стандартиний дистрибутив для встановлення
image = sparse # Визначаємо тип диску повний чи частинами

Створюємо домівки для наших віртуальних машин:

mkdir /home/xen
mkdir /home/xen/domains


Тепер ми готові до створення віртуальної машини

xen-create-image -hostname=mailserver -ip=10.0.0.21 -netmask=255.255.255.0 -gateway=10.0.0.1 -passwd


Після чого новостворену віртуалку можна запустити:

xm create mailserver.cfg


У випадку появи наступної помилки:

Error: Device 0 (vif) could not be connected. Backend device not found.


Потрібно перевірити чи ви увімкнена підтримка
network bridge, “(network-script network-bridge)”, в /etc/xen/xend-config.sxp після додавання потрібно пергрузити демон xen /etc/init.d/xend restart. Здопомогою команд “xm list” чи “xentop” можна подивитись яка віртуалка зараз крутиться:
debian5:# sudo xm list
Name ID Mem(MiB) VCPUs State Time(s)
Domain-0 0 874 1 r----- 657.9
mailserver 3 128 1 -b---- 8.0


Базуючись на моєму досвіді використання і впровадження технолоїй віртуалізації , а думаю що Xen це саме те для впровадження Linux і Linux-based технологій і це показує що вони готові до використання вже тепер. Технології віртуалізації вже тепер готові до впровадження в великих компаніях і дата центрах, і вони допомагають спростити настроювання, впровадження і встановлення працівникам, І я думаю що найближчі роки технології віртуалізації будуть грати важливу роль на серверному ринку.

7/17/2009

6/30/2009

VirtualBox 3.0 released

Changelog

VirtualBox 3.0.0 (released 2009-06-30)

This version is a major update. The following major new features were added:

  • Guest SMP with up to 32 virtual CPUs (VT-x and AMD-V only; see chapter 3.7.2.2 of the user manual)
  • Windows guests: ability to use Direct3D 8/9 applications / games (experimental; see chapter 4.8 of the user manual)
  • Support for OpenGL 2.0 for Windows, Linux and Solaris guests

In addition, the following items were fixed and/or added:

  • Solaris hosts: allow suspend/resume on the host when a VM is running (bug #3826)
  • Solaris hosts: loosen the restriction for contiguous physical memory under certain conditions
  • Mac OS X hosts: fixed guest PAE
  • Linux hosts: kernel module compile fixes for 2.6.31 (bug Fixed in SVN (closed)">#4264)
  • VMM: fixed occasional guru meditation when loading a saved state (VT-x only)
  • VMM: eliminated IO-APIC overhead with 32 bits guests (VT-x only, some Intel CPUs don’t support this feature (most do); bug #638)
  • VMM: fixed 64 bits CentOS guest hangs during early boot (AMD-V only; bug fixed in SVN (closed)">#3927)
  • VMM: performance improvements for certain PAE guests (e.g. Linux 2.6.29+ kernels)
  • VMM: some Windows guests detected a completely wrong CPU frequency (bug fixed in SVN (closed)">#2227)
  • VMM: fixed hanging and unkillable VM processes (bug fixed in ... (closed)">#4040)
  • VMM: fixed random infrequent guest crashes due to XMM state corruption (Win64 hosts only)
  • VMM: performance improvements for network I/O (VT-x/AMD-V only)
  • GUI: added mini toolbar for fullscreen and seamless mode (Thanks to Huihong Luo)
  • GUI: redesigned settings dialogs
  • GUI: allow to create/remove more than one host-only network adapters (non Windows hosts)
  • GUI: display estimated time for long running operations (e.g. OVF import/export)
  • GUI: fixed rare hangs when open the OVF import/export wizards (bug #4157)
  • 3D support: fixed VM crashes for client applications using incorrect OpenGL states
  • 3D support: fixed memory corruption when querying for supported texture compression formats
  • 3D support: fixed incorrect rendering of glDrawRangeElements
  • 3D support: fixed memory leak when using VBOs
  • 3D support: fixed glew library detection
  • 3D support: fixed random textures corruption
  • VRDP: support Windows 7 RDP client
  • Networking: fixed another problem with TX checksum offloading with Linux kernels up to version 2.6.18
  • NAT: fixed “open ports on virtual router 10.0.2.2 - 513, 514” (forum)
  • NAT: allow to configure socket and internal parameters
  • NAT: allow to bind sockets to specific interface
  • PXE boot: significant performance increase (VT-x/AMD-V only)
  • VHD: properly write empty sectors when cloning of VHD images (bug fixed in svn (closed)">#4080)
  • VHD: fixed crash when discarding snapshots of a VHD image
  • VHD: fixed access beyond the block bitmap which could lead to arbitrary crashes
  • VBoxManage: fixed incorrect partition table processing when creating VMDK files giving raw partition access (bug fixed in svn (closed)">#3510)
  • VBoxManage: support cloning to existing image file
  • OVF: several OVF 1.0 compatibility fixes
  • OVF: fixed exporting of disk images when multiple virtual machines are exported at once
  • Virtual mouse device: eliminated micro-movements of the virtual mouse which were confusing some applications (bug fixed in SVN (closed)">#3782)
  • Shared Folders: sometimes a file was created using the wrong permissions (2.2.0 regression; bug ... (closed)">#3785)
  • Shared Folders: allow to change file attributes from Linux guests and use the correct file mode when creating files
  • Shared Folders: some content was incorrectly written under certain conditions (bug #1187)
  • Shared Folders: fixed incorrect file timestamps, when using Windows guest on a Linux host (bug #3404)
  • X11 clipboard: fix duplicate end of lines (bug fixed in SVN (closed)">#4270)
  • X11 guests: a number of shared clipboard fixes
  • Linux guests: Guest Additions support for SUSE Linux Enterprise Desktop 11
  • Linux guests: new daemon vboxadd-service to handle time synchronization and guest property lookup
  • Linux guests: implemented guest properties (OS info, logged in users, basic network information)
  • Windows host installer: VirtualBox Python API can now be installed automatically (requires Python and Win32 Extensions installed)
  • USB: Support for high-speed isochronous endpoints has been added. In addition, read-ahead buffering is performed for input endpoints (currently Linux hosts only). This should allow additional devices to work, notably webcams (bug #242).
  • USB: fixed error handling for some USB dongles
  • Web service: fixed inability to handle NULL pointers for object arguments, which are valid values for a lot of APIs, in both the raw and the object-oriented web service.
  • Web service: object-oriented bindings for JAX-WS did not exhibit interface inheritance correctly, fixed
  • Web service: added support for IDisplay and IGuest interfaces, which were previously unavailable
  • Registration dialog uses Sun Online accounts now
http://www.virtualbox.org/wiki/Downloads

6/22/2009

just to remember

mount -t ext3 /dev/hdc1 /shared

6/17/2009

about torrent

short howto about P2P(torrent in this case) for newbie

  1. first of all you need software for using *.torrents files, for example I use uTorrent it can be downloaded from http://www.utorrent.com/downloads/
  2. you need one small file called torrent. if you already have it you need only add it into your torrent client if none you can find something in such large torrent databases as mininova.org, thepiratebay.com, isohunt.com etc.

6/03/2009

How to fix: locate: can not open `/var/lib/mlocate/mlocate.db’: No such file or directory

[root@ ~]# locate statistics
locate: can not open `/var/lib/mlocate/mlocate.db': No such file or directory
[root@ ~]# updatedb
[root@ ~]# locate statistics

/sys/class/net/lo/statistics
/sys/class/net/lo/statistics/collisions

4/19/2009

Convert flac/ape to mp3 in Windows

 

How to convert flac/ape to mp3 in windows.

1. mp3 player without lossless-format support

2. flac/ape file with .cue file

a. download and install Medieval CUE Splitter, then run it and open .cue file, finally ‘cut’ source flac/ape file.

b. download foobar2000 with Lame support.

Convert flac files to mp3.