Posts

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...

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 c...

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 mes...

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 [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] [error] [client 121.121.147.128] Premature end of script headers: test.cgi Then, next, upload it to your hosting cgi-bin/ folder, and you can access it trough web url such as mine: http://adam.ns52.small-dns.net/cgi-bin/test.pl but, in some servers, they may have to accessed thru sumthing like these: http://domain.com/~username/cgi-bin/test.pl well, in my case, perhaps sumthing like http://adam.ns52.small-dns.net/~adam/...

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 ...

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 u...

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