Posts

Showing posts from March, 2010

Installing PEAR::Mail class

here wut i did:

Check wuts been installed:

[root@ns46 /]# /usr/local/bin/pear list
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.3 stable
Console_Getopt 1.2.3 stable
PEAR 1.8.0 stable
Structures_Graph 1.0.2 stable
XML_Util 1.2.1 stable

I see no Mail or Net_SMTP there, hmm.. lets install it! But first, lets update our channels.

[root@ns46 /]# /usr/local/bin/pear update-channels
Updating channel "doc.php.net"
Channel "doc.php.net" is up to date
Updating channel "pear.php.net"
Update of Channel "pear.php.net" succeeded
Updating channel "pecl.php.net"
Update of Channel "pecl.php.net" succeeded

Good! Now install it.

[root@ns46 /]# /usr/local/bin/pear install pear/Mail
Did not download optional dependencies: pear/Net_SMTP, use --alldeps to download automatically
pear/Mail can optionally use package "pear/Net_SMTP" (version …

PHP Warning: PHP Startup: Unable to load dynamic library './xcache.so' - ./xcache.so: cannot open shared object file: No such file or directory in Un

So receive this warning on few servers? Why? As the error says, cannot load, the file might not b there. Wut to do? check.

[root@ns46 cur]# /usr/local/bin/php -v
PHP Warning: PHP Startup: Unable to load dynamic library './xcache.so' - ./xcache.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.2.10 (cli) (built: Jul 7 2009 02:36:57)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

Lets see config file. Wait, which config file? check.

[root@ns46 cur]# /usr/local/bin/php -i | grep Loaded
PHP Warning: PHP Startup: Unable to load dynamic library './xcache.so' - ./xcache.so: cannot open shared object file: No such file or directory in Unknown on line 0
Loaded Configuration File => /usr/local/Zend/etc/php.ini
[root@ns46 cur]#

Now w…

Installing Directadmin : The Manual Way

#
# Directadmin installation - Alak
#

screen
rm -f /usr/lib/libexpat.so
ln -s /usr/lib64/libexpat.so /usr/lib/libexpat.so

# Make /da directory as installation dir
#

mkdir /da
cd /da
wget http://www.directadmin.com/setup.sh
chmod 755 setup.sh
./setup.sh

UID:
LID:
FQDN:

# Apache choose option 2
# with default configs for apache 2.2 and php5 cli
# then wait till like 15 minutes (seriously wor..)
#
# Del existing mysql? YES
#

# after installation complete perform Auto updater in DirectAdmin
#

mkdir -p /usr/local/updatescript
cd /usr/local/updatescript
wget http://tools.web4host.net/update.script
chmod 755 update.script
./update.script DATE * not neseccary
./update.script UPDATEME
./update.script CLAMAV

# then, again, wait.. the script do its thingy..
# Next, to configure spams stuff..
#

vi /etc/exim.conf

# before primary_hostname =
# add

av_scanner = clamd:/tmp/clamd

# after check_message:
# WARNING! NOT acl_smtp_data = check_message
# NOTE! BEFORE the 'accept' line.
# add

deny message = This message contains malformed …

Running cgi scripts on server

Hi,

Hosting cgi-bin directory exist for sumthing, and its for running cgi scripts! :D

How? well, this is for my own benefit, and if this helps you guys out there, good. First, a perl script, just create a simple hello world as below, and save it as test.pl

#!/usr/bin/perl
# test.pl -- my first perl script!

print "Content-type: text/html\n\n";
print "Hello, world!\n";

Ok now, some explanations:

#!/usr/bin/perl <-- This line is th full path of the binary to run the script, in this case, is perl, and my server full path is /usr/bin/perl, but this may vary for different servers, some may have /usr/locl/bin/perl or perhaps /sbin/perl.. im not sure myself. haha OUH, IMPORTANT! for linux server, just CHMOD it to 700 cause in my case, if i dont do that, my /var/log/httpd/domains/adam.ns52.small-dns.net.error.log will spit out this error:

[Sun Mar 21 04:11:59 2010] [error] [client 121.121.147.128] suexec policy violation: see suexec log for more details
[Sun Mar 21 04:11:59 2010] …

Exim retry rules

Edit the /etc/exim.conf

32.8 Retry rule examples

Here are some example retry rules:

alice@wonderland.fict.example quota_5d F,7d,3h
wonderland.fict.example quota_5d
wonderland.fict.example * F,1h,15m; G,2d,1h,2;
lookingglass.fict.example * F,24h,30m;
* refused_A F,2h,20m;
* * F,2h,15m; G,16h,1h,1.5; F,5d,8h

The first rule sets up special handling for mail to alice@wonderland.fict.example when there is an over-quota error and the mailbox has not been read for at least 5 days. Retries continue every three hours for 7 days. The second rule handles over-quota errors for all other local parts at wonderland.fict.example; the absence of a local part has the same effect as supplying “*@”. As no retry algorithms are supplied, messages that fail are bounced immediately if the mailbox has not been read for at least 5 days.

The third rule handles all other errors at wonderland.fict.example; retries happen every 15 minutes for an ho…

PHP v5.3.1 + PEAR + Ioncube Loader + Xcache + Memcache + MySQL (64bit) v5.1.43 + Lighttpd v1.4.26

Client ask to install these:

PHP v5.3.1 + PEAR + Ioncube Loader + Xcache + Memcache
> > > - MySQL (64bit) v5.1.44
> > > - Lighttpd v1.4.26

Here goes:

ssh 43.200
--> scp -r /ips1 root@44.82:/
(will take around 10 minutes)

=====

ssh 44.82
MAKE SURE disbale iptables and selinux/enforce is 0. IF NOT GOT ERROR STARTING MYSQL.
cd /ips1
rpm -i *.rpm

IF got error, so need to do this:
http://bugs.mysql.com/bug.php?id=37165
[root@localhost root]# /etc/init.d/mysql start
Starting MySQL...Manager of pid-file quit without updating [FAILED]
[root@localhost root]# restorecon -v -R /var/lib/mysql/
[root@localhost root]# /etc/init.d/mysql start
Starting MySQL. [ OK ]

#
# Now installing PHP 5.3.1
#

yum install freetype freetype-devel libmcrypt-devel libc-client-devel libjpeg-devel libpng-devel glibc-devel libtool-ltdl-devel gd-devel php-gd -y

#
# the will be this error if configure stret :
# configure: error: Cannot find libmysqlclient under /usr.
# Note that th…

SquirellMail: Requested action aborted: error in processing 451 Temporary local problem - please try later

After fresh install Directadmin, got this erro when try to send out email:

RROR:
Message not sent. Server replied:

Requested action aborted: error in processing
451 Temporary local problem - please try later

And in /var/log/exim/paniclog is:

2010-03-12 18:00:57 1Nq1ft-0002Ax-0w malware acl condition: clamd: unable to connect to UNIX socket /tmp/clamd (No such file or directory)

Solution:

vi /etc/clamd.conf
look for LocalSocket, uncomment it so it becomes:

LocalSocket /tmp/clamd

then restart clamav:

[root@webapps updatescript]# /etc/init.d/clamd restart
Starting clamd daemon: /usr/local/sbin/clamd
Starting freshclam daemon: /usr/local/bin/freshclam -d -c 6
[root@webapps updatescript]#

then, gao tim! :D

Kudos HM Lee.

//alak

Hazardous $gt;__$lt;

Image
I got this fom teng. Nope, im not the one who creates this, Nope that 'Adam' is not me.

//alak

One mice is complicated enough.. -__-

Have you wondered about the amazing world of mices? Well this mice here refers to the mouse, the computing mouse. the ones you click click to go to your fav pr0n sites. Well, whats so fasinating? well, it may look like a simple dump device, we just move it, it maps the movements to the x and y coordinate on our display units, and depending on the pixel its on, it will responds accordingly (the software/apps). Well... a mouse is much more than just a dump little pointing device..

Types of mouse:

- Early mice
- Mechanical mouse devices
- Opto-mechanical
- Optical mice
- Laser mice
- Color of optical mouse diodes
- Glass laser mice
- Inertial and gyroscopic mice
- 3D mice

See? theres shitloads of mices, dont be fooled by those in lowyatts' being just poured down on floors selling for RM3 per piece.. -____-"

Then theres issues of connectivity, accelarations, precision, applications of multiple pointers, single buttons, double buttons, tripplets, and Apple stupidy have that magic mouse with m…

Tomcat: Website not showing after adding alias domain in DirectAdmin

the original domain is mdmecard.com

the added domain alias is libertyland.com.tw

Its still not working, why? simple, just add the <Alias>libertyland.com.tw</Alias>
in server.xml tomcat/conf/server.xml

<Host name="mdmecard.com" appBase="/home/mdmecard/domains/mdmecard.com/public_html/" autoDeploy="true" deployOnStartup="true" deployXML="true" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">
<Alias>www.mdmecard.com</Alias>
<Alias>libertyland.com.tw</Alias>
<Alias>www.libertyland.com.tw</Alias>
<Valve className="org.apache.catalina.valves.AccessLogValve" prefix="to" directory="/home/mdmecard/domains/mdmecard.com/logs"/>
<Context path="/manager" docBase="/usr/local/tomcat/server/webapps/mana"
<Context path="" docBas…

Exim Requested action aborted: error in processing 451 Temporary local problem - please try later

What i did:

Clean frozen emails,

/etc/init.d/exim restart
/etc/init.d/clamd restart

found solution here: http://www.directadmin.com/forum/archive/index.php/t-16084.html

kudos HMLee

//alak

Services

For example, restarting Apache,

RedHat:

/sbin/service httpd restart

FreeBSD:

/usr/local/etc/rc.d/httpd restart

Debian:

/etc/init.d/httpd restart

//alak