Skip to Content

Monthly Archives: June 2012

Berkeley DB error in exim log

Written on June 12, 2012 at 8:21 PM, by

Error: 2009-04-02 10:26:47 Berkeley DB error: PANIC: Invalid argument 2009-04-02 10:26:47 Berkeley DB error: PANIC: fatal region error detected; run recovery Fix: 1. Stop exim in the server 2. remove the files in /var/spool/exim/db/ 3. start exim to regenerate those files freshly.   Check logs again. You will see that the error disappeared.  

sample php mail script

Written on June 12, 2012 at 5:26 PM, by

<?php $server = $_SERVER[‘SERVER_NAME’]; mail(“gary@test.com”, $server ,$server, “FROM: test@”.$server); ?>

Sample SMTP MAIL Script

Written on June 12, 2012 at 5:25 PM, by

<?php //new function $to = “test@test.com”; $nameto = “Who To”; $from = “test123@test7.com”; $namefrom = “Who From”; $subject = “Hello World Again!”; $message = “World, Hello!”; authSendEmail($from, $namefrom, $to, $nameto, $subject, $message); ?> <?php /* * * * * * * * * * * * * * SEND EMAIL FUNCTIONS * * * * […]

capta not displaying issue

Written on June 11, 2012 at 7:18 PM, by

check freetype is installed or not in php. OR add the following entries in .htaccess: Options +Includes +ExecCGI AddHandler cgi-script .cgi .pl AddHandler server-parsed .shtml

check permission issue with mailman

Written on June 11, 2012 at 7:18 PM, by

/usr/local/cpanel/3rdparty/mailman/bin/check_perms to fix, run: /usr/local/cpanel/3rdparty/mailman/bin/check_perms -f

mysql connection test script

Written on June 11, 2012 at 7:16 PM, by

test mysql connection script: —————————- <? //Connecting to Database. $dbh=mysql_connect (“localhost”, “henrydb”, “henrypass”) or die (‘I cannot connect to the database because:’ . mysql_error()); mysql_select_db (“henrydb”); //Query to database $result = mysql_query(“SHOW tables”); while($row = mysql_fetch_row($result))   {       print(“$row[0]<br>”);   } ?>

fix for spamd not starting in server

Written on June 11, 2012 at 7:12 PM, by

In some cases spamd wont start along with exim im in the server. Use the following commands to fix it: sa-learn -D –force-expire sa-update -D /usr/local/cpanel/scripts/spamassassin_dbm_cleaner f/usr/local/cpanel/scripts/fixspamassassinfailedupdate /scripts/restartsrv_spamd If this does not fix the issue, use the following script in the server which installs spamd: /scripts/installspam It is also necessary that interface l0[localhost] is UP […]

/usr/tmpDSK 100 % in server

Written on June 11, 2012 at 7:08 PM, by

To fix this, use the command in shell: lsof +aL1 /tmp | awk ‘{print $2}’ | xargs kill -9  

disable cphulkd in a cpanel server

Written on June 11, 2012 at 7:03 PM, by

Use  this commands to disable cphulkd in server: for i in `ps aux | grep -i “cphulkd – process” | awk {‘print $2’}` ;do kill -9 $i ;done /usr/local/cpanel/bin/cphulk_pam_ctl –disable