Enable Iconv for PHP on DirectAdmin Linux Server

If you are having a Directadmin server with Apache 2 and you need to enable iconv support for php, log in as root and go to /usr/local/directadmin/customapache.

# cd /usr/local/directadmin/customapache

You should find configure.php_ap2 or configure.php files, depending on Apache version that is build using the Directadmin build system. To add iconv support we need to add the following line to these files:

–with-iconv

Then we need to go to the command line to the same directory to run our build script. The string will look like

# ./build php_ap2

If your Apache version is lower than 2, your string will be as follows:

# ./build php

It will ask you to rebuild the software you have, you don’t really need it. You won’t need to add any configure lines, the script will do this for you. Note that make and make install will be done automatically. Don’t forget to restart Apache.

Different APF log for TDP/UDP drops

We are able to create a separate log file for TCP/UDP OUTPUT and drops.

Requirements:

APF Firewall 0.9.3 or above. It may work on previous versions but haven’t tested. If you’re using an older version you should upgrade anyways.

Changing APF’s configuration:

1) Login to your server and su to root shell.

2) Create a new log file just for the TCP/UDP output/drops from APF.
touch /var/log/customlog

Set user permissions to restrict access.
chmod 600 /var/log/customlog

3) Change the syslog so it will tell iptables to use your new log file.
First lets make a backup to be safe:
cp /etc/syslog.conf /etc/syslog.conf.bak

vi /etc/syslog.conf

4) Add the following line at the bottom

# Send iptables LOGDROPs to /var/log/customlog
kern.=debug /var/log/customlog

5) Save the changes, ctrl + X then Y

6) Reload the syslogd service for the change to take effect.
service syslog reload

7) Open APF and edit the firewall configuration.
First lets make a backup to be safe:
cp /etc/apf/firewall /etc/apf/firewall.bak

vi /etc/apf/firewall

Find the following: DROP_LOG

You should see this: P.S. USE OUR PRINTER FRIENDLY VERSION TO AVOID TEXT WRAPPING, LINK AT TOP!

if [ “$DROP_LOG” == “1” ]; then
# Default TCP/UDP INPUT log chain
$IPT -A INPUT -p tcp -m limit –limit $LRATE/minute -i $IF -j LOG –log-prefix “** IN_TCP DROP ** ”
$IPT -A INPUT -p udp -m limit –limit $LRATE/minute -i $IF -j LOG –log-prefix “** IN_UDP DROP ** ”

Replace with the following:

if [ “$DROP_LOG” == “1” ]; then
# Default TCP/UDP INPUT log chain
$IPT -A INPUT -p tcp -m limit –limit $LRATE/minute -i $IF -j LOG –log-level debug
$IPT -A INPUT -p udp -m limit –limit $LRATE/minute -i $IF -j LOG –log-level debug

Find the following one more time: DROP_LOG

You should see this:

if [ “$DROP_LOG” == “1” ] && [ “$EGF” == “1” ]; then
# Default TCP/UDP OUTPUT log chain
$IPT -A OUTPUT -p tcp -m limit –limit $LRATE/minute -o $IF -j LOG –log-prefix “** OUT_TCP DROP ** ”
$IPT -A OUTPUT -p udp -m limit –limit $LRATE/minute -o $IF -j LOG –log-prefix “** OUT_UDP DROP ** ”

Replace with the following:

if [ “$DROP_LOG” == “1” ] && [ “$EGF” == “1” ]; then
# Default TCP/UDP OUTPUT log chain
$IPT -A OUTPUT -p tcp -m limit –limit $LRATE/minute -o $IF -j LOG –log-level debug
$IPT -A OUTPUT -p udp -m limit –limit $LRATE/minute -o $IF -j LOG –log-level debug
8) Save the changes to firewall.
Ctrl + X then Y

9) Restart apf for the changes to take effect.

apf –r

10) Make sure the new log file is getting written to:
tail –f /var/log/customlog

You should see things like:

Aug 27 15:48:31 fox kernel: IN=eth0 OUT= MAC=00:0d:61:37:76:84:00:d0:02:06:08:00:08:00 SRC=192.168.1.1 DST=192.168.1.1 LEN=34 TOS=0×00 PREC=0×00 TTL=118 ID=57369 PROTO=UDP SPT=4593 DPT=28000 LEN=14

Also check the messages log to make sure APF still isn’t writing to it.

tail –f /var/log/messages

Mozilla Firefox 4.0 Interface Mockups

The Mozilla Foundation has put up a page to explore interface changes in Firefox 4.0.

Two main versions are displayed, one showing the tabs beneath the address bar and one with the tabs above it. The tabs-on-top look is nice and clean, and saves space, but eliminates the title bar.

Also on the wiki page is a demonstration of an idea for combining the go, refresh, and stop buttons into a single context-sensitive button.

Firefox 4.0 changes are aiming to reduce interface complexity, increase page space, and hopefully increase clarity for the user while integrating more naturally into Windows.

ImapSync

imapsync is a tool for facilitating incremental recursive IMAP transfers from one mailbox to another. It is useful for mailbox migration, and reduces the amount of data transferred by only copying messages that are not present on both servers. Read, unread, and deleted flags are preserved and the process can be stopped and resumed. The original messages can optionally be deleted after a successful transfer.

Start applications on boot (Debian)

update-rc.d is the utility that Debian provides to manage init scripts. It is similiar to Redhat’s chkconfig. Say, you have a new service called “mine” that you would like to start at boot time. Make sure that the file “/etc/init.d/mine” exists. Below is the command that you can type to make your service run at boot time.

# update-rc.d mine defaults

This will make sure that when your system reaches runlevel 2, 3, 4 or 5 that the “mine” service will start up and that in runlevel 0, 1 or 6 it will be stopped. So you’re done with your “mine” and you would like to stop them from starting up when you reboot? Use the command to remove it from starting up at boot time:

# update-rc.d mine remove

To start up in runlevels 2 or 3, you could run the following command:

# update-rc.d mine start 45 stop 01236

Mine will start up when your system reaches runlevels 4 or 5, but stop at 0, 1, 2, 3 or 6.

rcconf ( apt-get install rcconf ) tool is a graphical interface that can be used from the shell to configure your init scripts.

Speech Recognition in Windows Vista?

You ever wanted to talk to your computer, like “Music On!”

In Windows Vista, you can do this 😉

Click the Start menu >> Control Panel >> Speech Recognition. >> Start Speech Recognition >> Now tell your computer what to do!

Be sure to take the Speech Tutorial first to get your computer to get the feel for your voice.

All versions of Windows Vista have one of the most powerful speech recognition systems available for consumers.

Once you finished, you should have your Recognition Panel at the top of your screen.

The program will interpret “everything” you say!!

Just say “Start” and the start menu opens on up. The cursor sits there in the search box, as it always does with the start menu is opened. Now you can speak what you want to search for.

If you want to launch a program , you can skip the start menu entirely by saying “Start [app name].”

Firefox 3.5 For Windows, Linux, Mac OS X

Firefox version 3.5 has been released and available for download. Firefox 3.5 is the fastest web browser. It is twice as fast as Firefox 3. As a result javascript and multimedia enabled web apps loads faster and supports open video and audio formats, allowing practically limitless new ways for sites to display rich content. This is based upon the open formats (HTML 5) which allow displaying media without a plug-in and/or proprietary software.
firefox
What’s New In Firefox 3.5

New set of security and other advanced features.

1) Private Browsing

Private browsing is a new feature that allows Firefox to control browsing history, images, videos, and cookies in cache. Firefox won’t keep any browser history, search history, download history, web form history, cookies, and temporary internet files. However, files you download and bookmarks you make will be kept. . This allows you to browse the Internet without storing data that could be retrieved at a later date to incriminate that person. This is useful for ecommerce and banking website.

To enable private browsing hit [CTRL]+ [SHIFT]+ [P] or simply visit Tools > Start Private Browsing

2) Forget This Site

Having second thoughts about having visited a certain Web site? With this feature, you can remove every trace of that site from your browser. Simply hit [CTRL+H] > Select Site > Right Click > Select Forgot about this site.

HTML 5 and CSS 3 Support

HTML 5, an update to the HTML language. Firefox 3.5 supports HTML5 and CSS 3. Checkout demo page for information.

Download Firefox v3.5

Visit the official website to grab Firefox 3.5.

How Do I Upgrade Firefox v3.x to v3.5?

Use your package manger or type the following commands (assuming that older firefox is installed at /opt/firefox), enter:

# cd /tmp
# wget ‘http://download.mozilla.org/?product=firefox-3.5&os=linux&lang=en-US’
Untar and install Firefox 3.5 (close all running FF sessions):
# tar -jxvf firefox-3.5.tar.bz2
# cp -avr firefox/* /opt/firefox/