Archive for September, 2009

Configuring DomainKeys from the CLI

September 28th, 2009
/usr/local/cpanel/bin/domain_keys_installer USERNAME
Share

Horde – Fatal error: Call to undefined method Registry::hasInterface() in /usr/local/cpanel/base/horde/config/prefs.php on line 134

September 28th, 2009

Fatal error: Call to undefined method Registry::hasInterface() in
/usr/local/cpanel/base/horde/config/prefs.php on line 134

If you are using the Turkish language in Horde, you may want to utilize English, if at all possible, due to a bug in PHP 5.2 which will not be resolved until PHP 6.

http://bugs.php.net/bug.php?id=35050

Share

Roundcube hangs when sending mail

September 27th, 2009

In recent builds of roundcube, you may find that you can’t send mail using Roundcube. If /var/cpanel/roundcube/log/errors shows the following:


[30-Jan-2009 14:07:11] Invalid response code received from server (421):
[30-Jan-2009 14:07:11] Invalid response code received from server (-1):
[30-Jan-2009 14:07:34 -0800] SMTP Error: SMTP error: Authentication failure: STARTTLS failed (Code: ) in /usr/local/cpanel/base/3rdparty/roundcube/program/steps/mail/func.inc on line 1248 (POST /3rdparty/roundcube/index.php?_task=mail&_action=send)
[30-Jan-2009 14:10:29] STARTTLS failed ():

Then there is an issue with the most recent Net-SMTP PHP module. To resolve this, edit the following file:


/usr/local/cpanel/base/3rdparty/roundcube/config/main.inc.php

and change

// SMTP username (if required) if you use %u as the username RoundCube
// will use the current username for login
$rcmail_config['smtp_user'] = '%u';

to this:


// SMTP username (if required) if you use %u as the username RoundCube
// will use the current username for login
$rcmail_config['smtp_user'] = '';

Share

Modify Default Mailbox Size

September 26th, 2009

If using x3, edit the following file:

/usr/local/cpanel/base/frontend/x3/mail/popsinclude.html

and modify


input type="text" name="quota" value="250"

Change the value from 250 to your new default. This will modify the default quota server-wide.

Share

suphp 500 error, Premature end of script headers

September 26th, 2009


[Sat Sep 26 22:02:33 2008] [error] [client 111.222.333.444] Premature end of script headers: phpinfo.php
[Sat Sep 26 22:02:33 2008] [error] [client 111.222.333.444] File does not exist: /home/username/public_html/500.shtml

First step: ensure that you’re using proper permissions on your files for suphp. Your php files should have 644 permissions, and ownership of the user whose home folder the files are in.

If ownership and permissions are correct, it could be a memory issue. I’ve found that some users who experience this error are running out of available memory for php to execute properly. You can try switching your PHP handler to cgi or fcgi, which will actually display an “out of memory” error in apache’s error_log, but suphp will not.


[Sat Sep 26 08:48:02 2009] [error] [client 111.222.333.444] Premature end of
script headers: php5
[Sat Sep 26 08:48:02 2009] [error] [client 111.222.333.444] File does not exist:
/home/username/public_html/500.shtml
[Sat Sep 26 08:48:02 2009] [error] [client 111.222.333.444] Out of memory

If you do have available RAM, but PHP isn’t able to use it, try increasing the RLimit value in httpd.conf and see if your script will execute then. If you look at “free” and you don’t have much free memory, you may need to upgrade your server or VPS.

Share

Track down “nobody” spammers, Add Extended Logging To Exim

September 25th, 2009

If you’re seeing outgoing spam from nobody@your.hostname.tld, you can track it down fairly easily.

In WHM, go to Exim Configuration Editor, then select Advanced Editor. In the first field, paste in:


log_selector = +address_rewrite +all_parents +arguments +connection_reject +delay_delivery +delivery_size +dnslist_defer +incoming_interface +incoming_port +lost_incoming_connection +queue_run +received_sender +received_recipients +retry_defer +sender_on_delivery +size_reject +skip_delivery +smtp_confirmation +smtp_connection +smtp_protocol_error +smtp_syntax_error +subject

You will then see extended logging in /var/log/exim_mainlog. You can simply run

grep cwd=/home /var/log/exim_mainlog

and that will show you the path for any user that is sending email via sendmail through exim. It won’t give you the filename, but at least you’ll have the user/folder name, and you can look through the scripts from there.

Share

no listening sockets available, shutting down

September 24th, 2009

(98)Address already in use: make_sock: could not bind to address [::]:80
no listening sockets available, shutting down
Unable to open logs

First let’s see what process is listening on that port:

lsof -i :80

Once you see what process is listening, you can kill it off

kill PID

replacing PID with the process ID number.

Share

Tomcat java.lang.OutOfMemoryError

September 24th, 2009

SEVERE: Caught exception (java.lang.OutOfMemoryError: Java heap space) executing org.apache.jk.common.ChannelSocket$SocketAcceptor@1e9c3f, terminating thread
Sep 24, 2009 2:02:23 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception

If you’re getting this error, place the following in /var/cpanel/tomcat.options,

-Xmx256m
-Xms256m

Then restart tomcat via /scripts/restartsrv_tomcat.

You’ll now see tomcat restart with your options:


[root@hosting logs]# vi /var/cpanel/tomcat.options
[root@hosting logs]# /scripts/restartsrv_tomcat
Adding in custom Tomcat option(s): -Xmx256m
Adding in custom Tomcat option(s): -Xms256m

Share

cPanel Community Support

September 24th, 2009

There are a few avenues of support outside of cPanel Technical Support, where you can ask other cPanel Administrators for support:

1. Forums – http://forums.cpanel.net

2. IRC – On EFNET, join #cpanel

Share

How do I see if my cPanel license is still valid?

September 24th, 2009

You can check cPanel’s Verification script at: http://www.cpanel.net/apps/verify/.

Share

cPanel Web Site Hosting by IntraHost