Dedicated Server Support

Tips on Linux, FreeBSD, Windows Dedicated Server.

Wednesday, March 29, 2006

Updating ClamAV virus defnition

On Linux Server i use ClamAV antivirus for email scanning.
 
ClamAV is a Free AntiVirus software for Linux, you can find mode details about clamav at
 
 
You can update clamav virus defnition with with command freshclam
 
[root@server10 root]# freshclam
ClamAV update process started at Wed Mar 29 12:19:52 2006
main.cvd is up to date (version: 36, sigs: 44686, f-level: 7, builder: tkojm)
Downloading daily.cvd [*]
daily.cvd updated (version: 1361, sigs: 3527, f-level: 7, builder: sven)
Database updated (48213 signatures) from database.clamav.net (IP: 205.139.192.13
)
[root@server10 root]#
 
It is good idea to run it in cron job, so virus defnition is always uptodate.
 
ClamAV is ported to Windows, you can find download Windows version of ClamAV from
 
 
 
 

Tuesday, March 28, 2006

BSNL DataOne

Yesterday i got BSNL DataOne ADSL connection.
 
Since DataOne is new here, i have taken the smallest plan. HOME 250, that allow only 0.4 GB of Data Transfer per month. Speed is 256 kbps (32 KBps). I am getting very good speed, today i see 62 KBps on my connection.
 
The speed is great compared to my old Reliance Platinum internet connection, that used to get 2 to 7 KBps.
 
Already applied for BSNL HOME 1800 plan. This will be 512 kbps, so i will be getting much better speed.
 
Only problem with BSNL is the data tranefer limit. For HOME 1800 plan, limit is 5 GB per month. Presently my usage is 4 GB per month on slow reliance connection. Having fast BSNL connection will increase the monthly data usage.

Monday, March 27, 2006

Installing quotatool on Linux Server

quotatool is a utility for setting filesystem quotas from the command line. It supports Linux (versions 2.6, 2.4, and 2.2, with ext2, ext3, ReiserFS, and XFS), Solaris, and AIX.
 
Today i installed quotatool on Linux server as i need to change quota of a user, i have done with edquota command available in Linux, this will open vi editor for editing quota.
 
quotatool is command line tool, i installed it as i want to see how it works.
 
First download latest version of the program from
 
 
wget urlto/quotatool-1.4.9.tar.gz
tar -zxvf quotatool-1.4.9.tar.gz
cd quotatool-1.4.9
./configure
make
make install
 
After installing, you can use quotatool. To see the quota of user backup on device /dev/sda3
 
# quotatool -d -u backup /dev/sda3
 
To get help
 
# quotatool
  quotatool version 1.4.9
  Copyright (c) 1999-2006 Mike Glover / Johan Ekenberg
  Distributed under the GNU General Public License
 
http://quotatool.ekenberg.se
 
Usage: quotatool -u uid | -g gid options [...] filesystem
       quotatool -u | -g  -t time -i | -b filesystem
Options:
  -b      : set block limits
  -i      : set inode limits
  -q n    : set soft limit to n blocks/inodes
  -l n    : set hard limit to n blocks/inodes
  -t time : set global grace period to time
  -r      : restart grace period for uid or gid
  -R      : raise-only, never lower quotas for uid/gid
  -d      : dump quota info in machine readable format (see manpage)
  -h      : show this help
  -v      : be verbose (twice or thrice for debugging)
  -V      : show version
  -n      : do nothing (useful with -v)
#

Editing User Quota in Linux

Today i created a user on Linux server for using as FTP backup.
 
After creating the user, i checked its quota and found it is 1 GB
 
# adduser backup
# passwd backup
 
# quota backup
Disk quotas for user backup (uid 32373):
Filesystem blocks quota limit grace files quota limit grace
/dev/sda3 52 1024000 1024000 7 0 0
#
 
The server have lot of free space, so i need to make 10 GB backup space.
 
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 229G 9.6G 207G 5% /
/dev/sda1 99M 17M 78M 18% /boot
none 1010M 0 1010M 0% /dev/shm
/usr/tmpDSK 485M 11M 449M 3% /tmp
/tmp 485M 11M 449M 3% /var/tmp
#
 
This can be done with edquota command. edquota will open in vi text editor or the editor specified in VISUAL, if you use pico, you cn change it to vi with
 
# export VISUAL=vi
 
To change quota of user backup
 
# edquota backup
Disk quotas for user backup (uid 32373):
Filesystem blocks soft hard inodes soft hard
/dev/sda3 52 1024000 1024000 7 0 0
 
Then add a ZERO to end of soft and hard limits, that is it will become
 
 
# edquota backup
Disk quotas for user backup (uid 32373):
Filesystem blocks soft hard inodes soft hard
/dev/sda3 52 10240000 10240000 7 0 0
 
You can change quota with command line using quotatool available at
 
 

FreeBSD Text Editor NVI sending Mails

After ports upgrade on FreeBSD 5.4, today i got a mail from the server. It is send by text editor NVI, NVI is VIM like editor in FreeBSD. If you call vi, what you get is nvi
 
From: Nvi recovery program <root@server22.hosthat.com>
To:
root@server22.hosthat.com
Date: Mar 27, 2006 2:21 PM
Subject: Nvi saved the file amalaika_ml.sql
 
On Thu Oct 13 12:21:48 2005, the user root was editing a
file named amalaika_ml.sql on the machine
server22.hosthat.com, when it was saved for recovery. You
can recover most, if not all, of the changes to this file
using the -r option to vi:
 
vi -r amalaika_ml.sql
 
See, i edited the file in October 13, 2005, i got the report in Mar 27, 2006, so this much be a new featured added to NVI.

Sunday, March 26, 2006

Upgrading MySQL to version 4.1 on Cpanel Server

Today i upgraded MySQL from version 4.0 to 4.1
 
[root@server10 root]# mysql --version
mysql  Ver 12.22 Distrib 4.0.25, for pc-linux-gnu (i686)
[root@server10 root]#
 
This is done as all other servers already using MySQL 4.1.
 
First have to set this on WHM, for this log in as root in WHM, then
 
Main >> Server Configuration >> Tweak Settings
 
Select MySQL 4.1 and save.
 
Now login to SSH as root and run
 
# /scripts/mysqlup
 
 
[root@server10 root]# /scripts/mysqlup
MySQL Setup Script Version 6.1
Fetching version information from
http://updates.cpanel.net/mysqlinstall/version (RELEASE)....Done
This is the MySQL 4.1.14 installer release number 0 for platform
MySQL-shared is out of date (MySQL-shared-4.0.25-0 != MySQL-shared-4.1.14-0)
MySQL-devel is out of date (MySQL-devel-4.0.25-0 != MySQL-devel-4.1.14-0)
MySQL-embedded is out of date (MySQL-embedded-4.0.25-0 != MySQL-embedded-4.1.14-0)
MySQL-client is out of date (MySQL-client-4.0.25-0 != MySQL-client-4.1.14-0)
MySQL-bench is out of date (MySQL-bench-4.0.25-0 != MySQL-bench-4.1.14-0)
MySQL-server is out of date (MySQL-server-4.0.25-0 != MySQL-server-4.1.14-0)
MySQL-shared is out of date (MySQL-shared-4.0.25-0 != MySQL-shared-4.1.14-0)
Gathering header information file(s) from server(s)

 
Once this is completed, you have MySQL 4.1 installed.
 
[root@server10 root]# mysql --version
mysql  Ver 14.7 Distrib 4.1.14, for pc-linux-gnu (i686) using readline 4.3
[root@server10 root]#

 
Now we have to upgrade perl modules, so that it will work with new MySQL version. This is done with
 
# /scripts/perlinstaller --force Bundle::DBD::mysql
 
Now we need to reinstall Apache/PHP, so that PHP will work with New MySQL version, this is done with
 
# /scripts/easyapache
 
 
MySQL 4.0 and 4.1 have some difference in the way passwords are stored.  So if your cpanel server use MySQL 4.0 and try to connect to another server that run MySQL 4.1, you will get error saying MySQL client need to upgraded.

MySQL 5 Error - Out of range value adjusted for column

Today i installed vBulletin on a Windows 2003 server, PHP 5 ISAPI, MySQL 5.
 
Installation process stoped with error "Out of range value adjusted for column"
 
This is error due to STRICT_TRANS_MODE is set in MySQL 5, to disable this, you can edit my.ini in MySQL installation file or taking "MySQL Server Instance Configuration Wizard" and removing the check box for "Enable Strict Mode"

Thursday, March 23, 2006

Exim Stoped working on FreeBSD 5.4

In  FreeBSD 5.4 Cpanel server exim stoped working.
 
There is no exim process running, when trying to start exim, i get following error
 
server20# /scripts/restartsrv_exim
/libexec/ld-elf.so.1: Shared object "libperl.so" not found, required by "exim"
/libexec/ld-elf.so.1: Shared object "libperl.so" not found, required by "exim"
server20#

 
I tried /scripts/eximup -f but it won't fix the problem.
 
The problem is perl upgraded after exim installation, to fix it, do
 
/usr/local/bin/perl-after-upgrade -f
 
Or you can reinstall exim from ports.

Installing ImageMagick on RHEL Server

Today installed AutoGallery SQL on a web site. AutoGallery SQL  need ImageMagick 6 or latest. The server was RHEL 3 and latest version of ImageMagick available with redhat up2date service was 5.6, so i installed ImageMagick from source code.
 
First uninstall ImageMagick installed version of ImageMagick
 
# rpm -qa|grep ImageMagick
ImageMagick-c++-devel-5.5.6-18
ImageMagick-5.5.6-18
ImageMagick-c++-5.5.6-18
ImageMagick-devel-5.5.6-18
ImageMagick-perl-5.5.6-18
 
# rpm -e ImageMagick-c++-devel-5.5.6-18
 
# rpm -e ImageMagick-5.5.6-18
 
# rpm -e ImageMagick-c++-5.5.6-18
 
# rpm -e ImageMagick-devel-5.5.6-18
 
# rpm -e ImageMagick-perl-5.5.6-18
 
 
Download ImageMagick source code in tar.gz format from
 
 
To install ImageMagick, first ddownload the source code with wget
 
 
Uncompress it

tar -zxvf ImageMagick-6.0.0.tar.gz
 

cd ImageMagick-6.0.0
./configure --enable-shared
make
make install
 
To check ImageMagick version, do
 
 
# which convert
/usr/local/bin/convert

 
# /usr/local/bin/convert -version
Version: ImageMagick 6.2.6 03/23/06 Q16
http://www.imagemagick.org
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC
 
#
 

Wednesday, March 22, 2006

FlashWebHost.com Reached 2,868 Hosted Domains

FlashWebHost.com, Kochi, Kerala based Web Hosting Provider reached 2,868 hosted domains mark as per webhosting.info report.
 
This report only counts domains that use FlashWebHost.com name server and do not include those sites hosted  using private label name servers. FlashWebHost provide private label name servers with most of its reseller web hosting (500 MB and above).
 
FlashWebHost.com is started in 4 Nov 2001, is largest web hosting company in Kerala (No of domains hosted).
 
Global Rank: 1,396
Country Rank: 652
Global Market share: 0.0044%
Country Market share: 0.0072%
 
You can find detailed report at webhosting.info
 
If you are looking for reliable Windows, Linux, FreeBSD web hosting, check out
 
 
Web Hosting plans start at $10 per year.
 

Monday, March 20, 2006

Creating Virtual Directory in Windows 2003

Here is how to create a virtual directory in windows server 2003 server.
 
1. Click Start, point to Programs, point to Administrative Tools, and then click Internet Services Manager.

2. In the Internet Information Services window, expand the folder, "Default Web Site"
3. Right-click the Web site that you want to create virtual directory, and then on the shortcut menu that appears, point to New, and click Virtual Directory to start the Virtual Directory Creation Wizard.
4. On the Welcome to the Virtual Directory Creation Wizard screen, click Next.

5. On the Virtual Directory Alias screen, type the alias that you want (Eg: bizhat), and then click Next.

6. On the Web Site Content Directory screen, type the path to the folder that you have virtual directory created, and then click Next.

7. On the Access Permissions screen, click Next, and then click Finish to complete the creation of the virtual directory.
 
Virtual directory in Windows is like symlink in Linux/FreeBSD.

Sunday, March 19, 2006

Buying a Cpanel VPS

Today one of my friend need to buy a VPS. His site was hosted in Cpanel Reseller Hosting account.
 
He want to move the sites to VPS. He have brought a Plesk VPS server from Godaddy, but moving the sites from Cpanel server to Plesk VPS was not very easy. The Plesk Migration Manager (PMM) was not properly working. It stopped after the first step, it show blank page instead of status. Godaddy say its Beta, manual moving of big site from cpanel server to plesk was not very easy, need to restore database one by one, then copy files etc...
 
So we start looking for a good VPS host that offer cpanel (godaddy only offer plesk at this time). Found few VPS hosts.
 
We start with
 
 
Owned by dedicatednow. But he was not happy with it.
 
Someone at WebHostingTalk suggested
 
 
Nobody is available when my friend tried to contact them.
 
 
They seems ok, but no one is available to pick the phone.
 
He is now considering
 
 
As there is some one to pick the phone when he called :-)
 
It show how important for a web hosting company to have sales personals available to handle customer enquiries.

Cpanel Multi language

Today a client want to install French language in his cpanel control panel.
 
Cpanel support different languages and can be downloaded from.
 
 
Cpanel Language files are files in .asc extension.
 
To install a language file, you have to login to WHM as root.
 
Languages > Upload a Language File
 
Then browse the downloaded language file and click upload.
 
Or you can install all laguages with
 
 
cd /usr/local/cpanel/lang
wget
http://www.demontech.net/cplang/lang.tar
tar -xvf lang.tar
mv catalan.asc catalan
mv dutch.asc dutch
mv french.asc french
mv german.asc german
mv polish.asc polish
mv portugues.asc portugues
mv portuguese.asc portuguese
mv romanian.asc romanian
mv russian.asc russian
mv spanish.asc spanish
mv turkish.asc turkish
mv svenska.asc svenska
m -f lang.tar
 

Saturday, March 18, 2006

Plesk Migration Manage (PMM) Shows Blank Page

On Plesk Server, Plesk Migration Manage (PMM) show Blank Page.
 
To correct the problem run following command in command prompt
 
# mysql -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e 'delete from PMM'
 
Or you may use
 
# mysql -uadmin -p`cat /etc/psa/.psa.shadow`
 
mysql> use psa
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
 
Database changed
mysql> select * from PMM;
 
You will see 40 rows of result.
 
mysql> delete from PMM;
Query OK, 40 rows affected (0.01 sec)
 
mysql>
 
 

Plesk Server - qmail not sending mails

On a Plesk Virtual Dedicated Server, qmail is not sending out emails.
 
I try sending few emails from command prompt with "mail" command. Everything went well, but no mails reached destination. I checked status of qmail, it says stoped, i tried to start, but it won't start.
 
# /etc/init.d/qmail status
qmail is stopped
# /etc/init.d/qmail start
Starting qmail:                                            [  OK  ]
# /etc/init.d/qmail status
qmail is stopped
#
 
I checked running qmail processes.
 
# ps aux|grep qmail
qmails    6819  0.0  0.0  1332  332 pts/0    S    02:50   0:00 qmail-send
qmaill    6882  0.0  0.0  1296  404 pts/0    S    02:50   0:00 splogger qmail
root      6912  0.0  0.0  1288  296 pts/0    S    02:50   0:00 qmail-lspawn ./Maildir/
qmailr    6948  0.0  0.0  1292  300 pts/0    S    02:50   0:00 qmail-rspawn
qmailq    6980  0.0  0.0  1280  288 pts/0    S    02:50   0:00 qmail-clean
root      9666  0.0  0.0  1412  484 pts/1    S    03:18   0:00 grep qmail
#
 
I checked qmail que, there was no emails in the que
 
# /var/qmail/bin/qmail-qstat
messages in queue: 0
messages in queue but not yet preprocessed: 0
#
 
I checked qmail log file
 
# tail /usr/local/psa/var/log/maillog
 
But there was no entry for sending email or any error.
 
On a search, i found Plesk 7.5.4. have some problem with qmail starting
 
I checked the Plesk version found it is same one
 
# cat /usr/local/psa/version
 
This was a bug with particular version of Plesk, in that files smtp_psa and smtps_psa get renamed to smtp.psa and smtps.psa, to fix it just rename the files and restarted xinetd.
 
cd /etc/xinetd.d
mv smtp.psa  smtp_psa
mv smtps.psa smtps_psa
/etc/rc.d/init.d/xinetd restart
 
Now the qmail start working.
 
I send a mail to my gmail account, i got it with out any problem, then send a mail to my email account @bizhat.com, it won't go, on checking the server log i found
 
F=<root@SmartBusiness.prod.phx1.secureserver.net> rejected RCPT <mm @bizhat.com>: Sender verify failed
2006-03-18 15:42:12 unexpected disconnection while reading SMTP command from (bizhat.com) [212.19.143.89]
 
 
The problem was the the hostname of qmail is invalid, so i changed the hostname of the server in
 
/var/qmail/control/me
 
and restarted qmail. Now everything start working.
 
 
 

Friday, March 17, 2006

Installing CPAN

CPAN is a collection of Perl Modules. Perl Modules are pre written perl programs that you can reuse in your scripts. This will save you time of writing all the codes yourself.
 
To install CPAN modules on Linux or FreeBSD server, you can run the command "cpan" in command prompt.
 
# cpan
cpan >
 
To install a module, say if you need to install Net::SSLeay Cpan module, you have to do
 
# cpan
cpan > install Net::SSLeay
cpan > exit
#
 
After installing you can exit cpan shell by typing the command "exit"
 
At times, you need to upgrade the cpan modules itself, if there is new version of cpan module available, this can also done with cpan shell.
 
# cpan
cpan > install Bundle::CPAN
cpan > reload cpan
cpan > exit
#
 
reload cpan command will reload newly install cpan shell. After reloading you can continue working with cpan shell.

Wednesday, March 15, 2006

AccountLab Plus Web Hosting Billing Software Installation

AccountLab Plus is a Web Hosting Billing Software. This can be easily installed through Fantastico in Cpanel servers. AccountLab Plus allow you to manage your web hosting customers, auto account creation with cpanel, plesk, direct admin control panels.

AccountLab Plus supports several payment methods, paypal, authorize.net, 2checkout and many others. I think this billing software support almost all the payment processing services that a web host ever need.

The price is also good, it only cost $47 to get the licence, you need to renew it after 1 year for $17. Still its good Billig software. If you are buying modernbill licence, you need to pay atleast $15 per month ($27 is listed price).

The only thing i miss in AccountLab Plus is support for Windows servers, ModernBill support auto account creation in HELM control panel.

One thing i like about AccountLab Plus is, it support registering domain with directi using API. It also support Enom domain registration API.

You can find more details (demo available) at

http://www.netenberg.com/accountlabplus.php

Today i installed AccountLab Plus for a customer at

http://www.powix.ch

 

BSNL DataOne Internet Connection

I am using Reliance internet through CDMA network. They allow unlimited internet browsing for Rs. 1800/- per month. But speed is not good always, at times, have to wait for simple upload.
 
BSNL have started providing DataOne Broad Band internet in our exchange. I am plaing to switch to DataOne, still plan to keep Reliance connection (downgrading) as a backup connection in case of BSNL have any problem.
 
BSNL is said to be of good speed, anyway have to wait and see.
 
 
They even have a 60 day trail broad band connection.
 
 

Tuesday, March 14, 2006

how to tell if php is installed freebsd

Today i got a visitor from MSN
 
He searched for
 
"how to tell if php is installed freebsd"
 
And NetFreeHost.com Script Installation Service is listed on first page
 
 
For any one what to know if PHP is installed in FreeBSD server, you can do following
 
# php -v
 
It will show PHP Version.
 
To check if php is installed from ports, do
 
# pkg_info | grep php
 
Also you can do
 
# which php
 

Saturday, March 11, 2006

Installing eaccelerator on FreeBSD 6

After having problem with APC Cache, i have installed eaccelerator on FreeBSD 6 server.
 
eaccelerator is available in FreeBSD ports tree.
 
freebsd# cd /usr/ports
freebsd# make search name=eaccelerator
Port:   eaccelerator-0.9.4.r1_2
Path:   /usr/ports/www/eaccelerator
Info:   An opcode cache for PHP with encoder and loader
Maint: 
ale@FreeBSD.org
B-deps: apache-1.3.34_4 autoconf-2.59_2 expat-2.0.0_1 m4-1.
.4.2_1 php4-session-4.4.2_1
R-deps: apache-1.3.34_4 expat-2.0.0_1 perl-5.8.8 php4-4.4.2
_1
WWW:   
http://eaccelerator.net/
 
freebsd#
I have installed it with
 
# cd /usr/ports/www/eaccelerator/
# make install clean
 
After installation you need to do the following
 
You have installed the eaccelerator package.
 
Edit /usr/local/etc/php.ini and add:
 
zend_extension="/usr/local/lib/php/20050922/eaccelerator.so"
 
Then create the cache directory:
 
mkdir /tmp/eaccelerator
chown www /tmp/eaccelerator
chmod 0700 /tmp/eaccelerator
 
After eaccelerator installed, you can verify this in phpinfo.
 
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
    with eAccelerator v0.9.4-rc1, Copyright (c) 2004-2005 eAccelerator, by eAccelerator
 
 
You can also see it with
 
server24# php -v
PHP 5.1.2 (cli) (built: Mar 7 2006 18:14:58 ) (DEBUG)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
    with eAccelerator v0.9.4-rc1, Copyright (c) 2004-2004 eAccelerator, by eAccelerator
server24#

monitord - Service that restarts other standalone services

After installing APC cache, i found the Apache crashed and was down for near 12 hours.
 
In Cpanel Servers, there is a service called chkservd, that will monitor services and if any of the service found down, it will restart it. On my FreeBSD servers with control panel, so far all servers working with out the need for such a software. Now because of APC, Apache when down. Anyway i have removed apache, still want to make sure this won't happen again.
 
On checking FreeBSD ports found port monitord, that will monitor services and if any go down, will restart it.
 
Port:   monitord-0.4.1
Path:   /usr/ports/sysutils/monitord
Info:   Service that restarts other standalone services

 
This port allows one to monitor other standalone services and automatically restart them if they are accidentally and unwittingly terminated, or crash either because of instability or a DoS attack. It simplifies a task capable of being performed by cron(8) by not requiring custom scripts to be written for each service being monitored. The configuration file is simple and easily setup.
 
I have installed monitord with
 
freebsd# cd /usr/ports/sysutils/monitord
freebsd# make install
===>  Installing for monitord-0.4.1
===>   Generating temporary packing list
===>  Checking if sysutils/monitord already installed
"Makefile", line 28: warning: duplicate script for target "monitord" ignored
install  -s -o root -g wheel -m 555 monitord /usr/local/sbin
if [ ! -e /usr/local/etc/monitord.conf.sample ] ; then install  -o root -g wheel -m 444 monitord.conf.sample /usr/local/etc; fi
install  -o root -g wheel -m 444 -c monitord.8 /usr/local/man/man8
===>   Compressing manual pages for monitord-0.4.1
===>   Registering installation for monitord-0.4.1
freebsd# make clean
===>  Cleaning for monitord-0.4.1
freebsd#
 
Now we need to configure it, first step is
 
# cd /usr/local/etc/
# cp monitord.conf.sample monitord.conf
 
Now edit monitord.conf and put your email address and service that you need to monitor.
 
Read monitord man page for more info
 
# man monitord
 

Install Alternative PHP Cache on FreeBSD

Two days back i have installed Alternative PHP Cache on FreeBSD 6 server.
 
Alternative PHP Cache is used to speed up PHP script execution.
 
You can find more about APC at
 
 
On FreeBSD 6, its available on ports tree.
 
 
Port:   pecl-APC-3.0.8_1
Path:   /usr/ports/www/pecl-APC
Info:   Alternative PHP Cache
Maint: 
mnag@FreeBSD.org
B-deps: apache-1.3.34_4 autoconf-2.59_2 expat-2.0.0_1 m4-1.4.4 perl-5.8.8 php4-4.4.2_1
R-deps: apache-1.3.34_4 expat-2.0.0_1 perl-5.8.8 php4-4.4.2_1
WWW:   
http://pecl.php.net/package/APC
 
I have installed it with
 
server24# cd /usr/ports/www/pecl-APC
server24# make
server24# make install

After installing, i have edited /usr/local/etc/php.ini and added following entry
 
apc.enabled="1"
apc.shm_size="30"

Everything works fine, in phpinfo, i got a section saying
 
 
apc
APC Support  enabled 
Version  3.0.8 
MMAP Support  Disabled 
Revision  $Revision: 3.68 $ 
Build Date  Mar 8 2006 20:46:13
 
 
After after two days, i found Apache getting down. I checked the apache error log at /var/log/httpd-error.log and found following error message
 
 
[Sat Mar 11 00:00:02 2006] [apc-error] apc_shm_create: shmget(0, 31457280,914) failed: Cannot allo
cate memory. It is possible that the chosen SHM segment size is higher than the operation system a
llows. Linux has usually a default limit of 32MB per segment.
[Sat Mar 11 15:30:13 2006] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat Mar 11 15:30:14 2006] [notice] Digest: generating secret for digest authentication ...
[Sat Mar 11 15:30:14 2006] [notice] Digest: done
[Sat Mar 11 15:30:15 2006] [warn] pid file /var/run/httpd.pid overwritten -- Unclean shutdown of p
revious Apache run?

Some thing wrong with APC, so i uninstalled it
 
server24# cd /usr/ports/www/pecl-APC
server24# make deinstall

Then edited /usr/local/etc/php.ini and removed following lines.
 
apc.enabled="1"
apc.shm_size="30"
 
I have been using eaccelerator with out any problem on my other servers, so have installed it, lets see if Apache have any problem with it.

Wednesday, March 01, 2006

ASP.NET Showing Errors

ASP.NET by default show custom error page if there is any error in the script. This is for security.
 
For debuging your code, you may need to see the actual error. To enable ASP.NET script show the actual error, create a file with name web.config and upload it to you server with following content.
 
 
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>