A fatal error has occurred Could not connect to database for SQL SessionHandler. Details have been logged for the administrator.

27 06 2008
NB: This is the fix for cpanel servers

# Check the file /usr/local/cpanel/base/horde/config/conf.php

# You can find the following entry in the conf.php

$conf['sql']['hostspec'] = 'localhost';
$conf['sql']['username'] = 'horde';
$conf['sql']['password'] = '<password>';
$conf['sql']['protocol'] = 'tcp';
$conf['sql']['database'] = 'horde';

Try to connect the database horde using the following method
#mysql -uhorde -p<password>

The password is one you get from the above file.

 You will get the "ERROR 1045 (28000): Access denied for user
'horde'@'localhost' (using password: YES)"

5. grant the privilege to the database using the mysql( in mysql prompt)
mysql> grant all privileges on horde.* to horde@localhost identified by
'<password>';

You can now login into the Horde Webmail now.




Rvsitebuilder installation in Cpanel

27 06 2008

1. If the server has RVSkin installed, update RVSkin to v6.75 up. (Skip this step if you don’t have it).

perl /root/rvadmin/auto_rvskin.pl

2. After getting the license confirmation, SSH to the cPanel server as root, download the installer using the command below:

cd /usr/local/cpanel/whostmgr/docroot/cgi/
rm -f rvsitebuilderinstaller.tar
wget http://download.rvglobalsoft.com/rvsitebuilderinstaller.tar
tar -xvf rvsitebuilderinstaller.tar
chmod 755 addon_rvsitebuilder.cgi

3. Open WHM as root user, at the bottom left menu under Plugins section, you can find RVSiteBuilder Installer menu.

4. Click RVSiteBuilder Installer to begin the installation process.

5. After complete the installation, you will be sent to RVSiteBuilder Manager automatically.





cpanel scripts in the folder /scripts

27 06 2008

* adddns – Adds a DNS zone.
* addnetmaskips – Add the netmask 255.255.255.0 to all IPs that have no netmask.
* addnobodygrp – Adds the group nobody and activates security.
* addpop – Add a Pop Account.
* addservlets – Add JSP support to an account (requires tomcat).
* adduser – Add a user to the system.
* betaexim – Installs the latest version of exim.
* biglogcheck – looks for logs nearing 2 gigabytes in size
* bsdcryptoinstall – Installs crypto on FreeBSD.
* bsdldconfig – Configures the proper lib directories in FreeBSD.
* bsdpkgpingtest – Tests the connection speed for downloading FreeBSD packages.
* buildeximconf – Rebuilds exim.conf.
* buildpostgrebsd-dev – Installs postgresql on FreeBSD.
* checkbadconf – Checks /usr/local/apache/conf/httpd.conf for bad users.
* checkbsdgroups – Checks and repairs proftpd ownership on FreeBSD.
* checkccompiler – Checks to make sure the C compiler works on your system.
* checkfpkey – Checks for the FrontPage suid key
* checkgd – Checks to see if GD is built.
* checkinterchange – (Internal use).
* checklibssl – Checks to make sure the proper libssl symlinks exist.
* checkmaxclients – Checks to see if apache has reached the maximum clients allowed.
* checkoldperl – Checks to see if the version of Perl on your system is old.
* checkrsync – Checks to make sure rsync is up to date.
* checksuexecpatch – Checks to see if mailman has been patched for suexec.
* checksuspendpages – Checks to see if suspend pages are properly named.
* checkup2date – Makes sure up2date is set up properly (RedHat)
* checkyum – Makes sure yum is set up properly.
* chkpaths – Makes sure /usr/sbin/chown has a symlink to /bin/chown
* chownpublichtmls – Change ownership of all users web space to them, which is useful for converting to
suexec. Files owned by nobody are deleted.
* ckillall – Allows you to kill a process (used like killall).
* cleanbw – Cleans up old bandwidth logs.
* cleandns8 – Clean up named.conf.
* cleangd – Cleans up old GD installs and reinstalls GD
* cleanmd5 – Fix CPAN md5 problems.
* cleanmsglog – cleans exim’s msglog
* cleanupmysqlprivs – Cleans up improper mySQL privileges.
* compilers – Disables the usage of compilers for unprivileged users.
* convert2maildir – Converts mail from mbox to maildir format and installs courier impap and pop (cpimap is
removed).
* cpbackup – Runs backups.
* distupgrade – Upgrades RedHat to the newest version (for testing only)
* dnscluster – Enables DNS clustering.
* dnstransfer – Only if the server has a DNS master (sync with DNS master).
* downgradefp – Downgrades FrontPage Extensions (to 5.0-0)
* dropmysqldb – Drops a mySQL database.
* easyapache – Upgrade Apache
* editquota – Change a users quota.
* enablechkservdwebmail – Enable service checking of webmaild.
* enablefileprotect – Protects home directories if file protection is built in apache.
* ensurepkg – Installs a FreeBSD package.
* ensurerpm – Installs a rpm.
* exim3 – Installs exim 3.
* exim4 – Installs exim 4.
* eximlocalsend – Enables/Disables exim local sending.
* eximup – Installs/Updates exim.
* findhacks – Search for common Trojan Horses.
* findoddrootprocesses – Lists root processes that may need to be checked out.
* findphpversion – Check to see if your php version file is up to date.
* fixallcartswithsuexec – Fixes permissions on carts when using suexec.
* fixbinpath – Makes sure all bin file paths are correct.
* fixbuggynamed – Updates bind to solve any problems with bugs.
* fixcommonproblems – Attempt to fix the most common problems.
* fixetchosts – Fixes problems with /etc/hosts
* fixeverything – Fix common problems and quotas.
* fixinterchange – Reinstall interchange Perl modules.
* fixinterchangeperm – fix permissions on a user’s interchange cart.
* fixlocalhostwithphp – Change /etc/hosts to work better with PHP 4.2.0 + MySQL.
* fixmailman – Updates and restarts mailman.
* fixmysql – Fixes problems with mySQL.
* fixmysqlbsd – Fixes problesm with mySQL on FreeBSD.
* fixnamed – Updates bind to handle many DNS zones (more than 512).
* fixpop – Fix a POP account and reset password.
* fixproftpdconf – Fixes problems with /usr/local/etc/proftpd.conf
* fixproftpddupes – Updates proftpd.
* fixquotas – Fix quotas.
* fixrndc – Fixes named.conf to prevent rndc staus failed.
* fixsubdomainlogs – Run if subdomain logs don’t show up in cPanel.
* fixsuexeccgiscripts – Fix CGI scripts that are broken after suexec installed.
* fixvaliases – Fix permisions on valiases.
* fixwebalizer – Repair a Webalizer that has stopped updating.
* fpanonuserpatch – Updates FrontPage extensions to include the anonymous user patch.
* ftpquaotacheck – Runs quota checking for all ftp users.
* ftpup – Updates your ftp server.
* fullhordereset – Resets Horde and displays the current Horde password.
* gcc3 – Installs gcc-3.3.3
* gencrt – Generate a .crt and .csr file.
* initfpsuexec – Enable FrontPage suexec support.
* initquotas – Turn on quota support on new drives.
* initsslhttpd – Make sure HTTP starts with SSL.
* initsuexec – Turn on suexec support if suexec is installed.
* installfpfreebsd – Installs FrontPage 5 Extensions on FreeBSD.
* installfpgentoo – Installs FrontPage on Gentoo.
* installgd – Builds GD.
* installpkg – Installs a FreeBSD package.
* installpostgres – Installs PostrgeSQL.
* installzendopt – Install zend optimzer.
* installzendopt-freebsd – Install zend optimizer on a freebsd machine.
* isdedicatedip – Checks an ip to see if it is dedicated.
* killacct – Delete an account.
* killdns – Delete a DNS zone.
* killpvhost – Removes a virtual host from proftpd.conf.
* killspamkeys – Removes a spam key.
* killsslvhost – Removes a SSL entry for a virtual host.
* killvhost – Delete a vhost.
* listcheck – Checks mailing lists for issues.
* listproblems – Lists common problems.
* listsubdomains – List subdomains.
* mailperm – Fix almost any mail permission problem.
* mailscannerupdate – Updates MailScanner
* makecpphp – Installs php.
* manualupcp – Updates cPanel manually.
* md5crypt – Encrypts a password into MD5.
* mysqladduserdb – Create a MySQL databse and user.
* mysqlconnectioncheck – Attempts to connect to MySQL, restarts SQL if necessary.
* mysqldeluserdb – Delete a MySQL database and user.
* mysqlpasswd – Change MySQL password.
* mysqlup – Updates mySQL.
* newexim – Installs the latest version of exim.
* nofsck – Make fsck always use -y
* nomodattach – Removes mod_attach from httpd.conf.
* nomodauthmysql -Removes mod_auth_mysql from httpd.conf.
* nomodbwprotect – Removes mod_bwportect from httpd.conf.
* nomodgzipconfmods – Removes mod_gzip from httpd.conf.
* nomodperl – Removes mod_perl from httpd.conf.
* park – Parks a domain.
* patcheximconf – Fixes exim.conf.
* perlinstaller – Installs perl.
* phpini – Create a php.ini file.
* proftpd128 – Installs proftpd-1.2.8.
* quickkernel – Updates your kernel.
* quicksecure – Quickly kill useless services.
* rebuildcpanelsslcrt – Rebuilds the cPanel SSL Certificate.
* rebuildcpusers – Rebuilds /var/cpanel/users.
* rebuildetcpasswd – Rebuilds /etc/passwd.
* rebuildeximbsd – Rebuilds exim on FreeBSD.
* rebuildhttpdconffromproftpd – Rebuild httpd.conf from the proftpd.conf file.
* rebuildnamedconf – Restore named.conf from files in /var/named.
* rebuildproftpd – Restore proftpd.conf from httpd.conf.
* reinstallmailman – Reinstalls mailman.
* reseteximtodefaults – Resets exim’s default settings.
* resetimappasswds – Resets all imap passwords.
* restartsrv – Restart a service.
* restartsrv_apache – Restart apache.
* restartsrv_bind – Restart bind.
* restartsrv_clamd – Restart clamd.
* restartsrv_courier – Restart courier imap.
* restartsrv_cppop – Restart cppop.
* restartsrv_entropychat – Restart entropy chat.
* restartsrv_exim – Restart exim.
* restartsrv_eximstats – Restart exim statistics.
* restartsrv_ftpserver – Restart your ftp server.
* restartsrv_httpd – Restart httpd.
* restartsrv_imap – Restart impad.
* restartsrv_inetd – Restart inetd.
* restartsrv_interchange – Restart Interchange Shopping Cart.
* restartsrv_melange – Restart melange chat.
* restartsrv_mysql – Restart mysqld.
* restartsrv_named – Restart named.
* restartsrv_postgres – Restart postgresql.
* restartsrv_postgresql – Restart postgresql.
* restartsrv_proftpd – Restart proftpd.
* restartsrv_pureftpd – Restart pure-ftpd.
* restartsrv_spamd – Restart spamd.
* restartsrv_sshd – Restart sshd.
* restartsrv_syslogd – Restart syslogd.
* restartsrv_tomcat – Restart tomcat.
* restartsrv_xinetd – Restart xinetd.
* restoremail – Restores a user’s mail.
* runstatsonce – Runs statistics (should be used from the crontab).
* runweblogs – Run analog/webalizer/etc. for a user.
* safeyum – Runs yum safely.
* setupfp – Install FrontPage 3 on an account.
* setupfp4 – Install FrontPage 4 (2000) installer on an account.
* setupfp5 – Install FrontPage 5 (2002) installer on an account.
* setupfp5.nosueuxec – Install FrontPage 5 (2002) installer on an account when not using suexec.
* unsetupfp4 – Removes FrontPage 4 or 5 from an account.
* unsuspendacct – Unsuspends an account.
* upcp – Updates cPanel.
* whoowns – Finds out who owns a domain.
* wwwacct – Creates an account.





Apache status page shows blank in WHM

27 06 2008

If you are having issue with WHM, that if the Apache status page is showing blank in WHM then here goes the fix.

Run the following command in the server konsole.

/scripts/addstatus

Now the issue should be fixed.





Error from domain wrapper: domain.com is owned by another user.

27 06 2008

NB: Please note that domain.com is shown as an example…

If you are getting this error when trying to add subdomains to any of your cPanel accounts the reason and fix is given below.

This happens when cPanel doesn’t remove the subdomain correctly and when you add it(if you are trying to delete the subdomain and then adding it), cpanel thinks it’s still there. So when you try to add it back you get an error. Now here goes the fix:

1. Remove domain.com from /var/cpanel/users/cpanel-username

3. Run /scripts/updateuserdomains as root user on the server.

2. Remove /var/named/domain.com.db if the file exists (it doesn’t always)

3. Remove the virtualhost for domain.com on /usr/local/apache/conf/httpd.conf

4. Remove domain.com from /etc/named.conf

Now you can add the domain back on in cPanel with no problems.





cpanel cannot be accessed using IP/whm and IP/cpanel

27 06 2008

If cpanel cannot be accessed using IP/whm and IP/cpanel, but can be accessed using IP:2086 and IP:2082, then here goes the solution for the same.

The reason for this issue due to missing some lines in httpd.conf.

Fix
====

1) Open the apache configuration file(httpd.conf) in your favorite editor.

2) Add the following lines in the httpd.conf.

===================================================================

ErrorDocument 400 /400.shtml
ErrorDocument 401 /401.shtml
ErrorDocument 403 /403.shtml
ErrorDocument 404 /404.shtml
ErrorDocument 500 /500.shtml
ScriptAlias /cgi-sys/ /usr/local/cpanel/cgi-sys/ Alias /sys_cpanel/ /usr/local/cpanel/sys_cpanel/ Alias /java-sys/ /usr/local/cpanel/java-sys/ Alias /img-sys/ /usr/local/cpanel/img-sys/ Alias /akopia/ /usr/local/cpanel/3rdparty/interchange/share/akopia/

Alias /neo-images/ /usr/local/cpanel/base/neomail/neo-images/
ScriptAliasMatch ^/cpanel/(.*) /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /cpanel /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /whm /usr/local/cpanel/cgi-sys/whmredirect.cgi
ScriptAlias /securewhm /usr/local/cpanel/cgi-sys/swhmredirect.cgi
ScriptAlias /webmail /usr/local/cpanel/cgi-sys/wredirect.cgi
ScriptAliasMatch ^/webmail/(.*) /usr/local/cpanel/cgi-sys/wredirect.cgi
ScriptAliasMatch ^/kpanel/(.*) /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /controlpanel /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /securecontrolpanel /usr/local/cpanel/cgi-sys/sredirect.cgi
Alias /mailman/archives/ /usr/local/cpanel/3rdparty/mailman/archives/public/
ScriptAlias /mailman/ /usr/local/cpanel/3rdparty/mailman/cgi-bin/
Alias /pipermail/ /usr/local/cpanel/3rdparty/mailman/archives/public/
Alias /interchange/ /usr/local/cpanel/3rdparty/interchange/share/interchange/
Alias /interchange-5/ /usr/local/cpanel/3rdparty/interchange/share/interchange-5/

===================================================================

3) Now restart the httpd service in the server.





Installing cpanel in linux server

27 06 2008

You can use the following steps to install the cpanel.

1) Create a directory for downloading the installation script.

mkdir /home/cpins

2) Access the directory you have created.

cd /home/cpins

3) Download the installation script.

wget http://layer1.cpanel.net/latest

4) Execute the installation script. This will install the latest version of cpanel.

sh latest





Disable stats service for a particular user in cpanel

27 06 2008

You can disable the stats service(Analog or Awstats or Webalizer stats) for a particular user in cpanel using the following steps.

1) Login to the server via ssh.

2) Add the following entries in the cpanel user file /var/cpanel/users/username (Replace “username”
with the name of user).

skipanalog=1
skipawstats=1
skipwebalizer=1

3) Now restart the cpanel service in the server.

/etc/init.d/cpanel restart





How to disable the the stats services(Analog or Awstats or Webalizer stats) in a cpanel server via backend.

27 06 2008

You can disable Analog or Awstats or Webalizer stats in a cpanel server via backend by editing the file “/var/cpanel/cpanel.config“.

# Check for the variables skipanalog, skipawstats, skipwebalizer in the file and change the values
of the variables to one. Now the variables should look like as follows:

skipanalog=1
skipawstats=1
skipwebalizer=1

# Save the changes and restart the cpanel service in the server.

/etc/init.d/cpanel restart

# Now the all the three stats will be disabled server wide.





How to change time zone in Linux

27 06 2008

1. Log in as root, check which timezone your machine is currently using by executing `date`. You’ll see something like “Mon Feb 12 05:09:00 CST 2007″, CST in this case is the current timezone.

2. Change to the directory to /usr/share/zoneinfo, here you will find a list of time zone regions. Choose the most appropriate region. If you live in Canada or the US this directory is the “Americas” directory.

3. If you wish, backup the previous timezone configuration by copying it to a different location. Such as `mv /etc/localtime /etc/localtime-old`.

4. Create a symbolic link from the appropiate timezone to /etc/localtime. Example: `ln -s /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime`.

5. If you have the utility rdate, update the current system time by executing `rdate -s time.nist.gov` or `rdate -s rdate.cpanel.net`

6. Synchronize hardware clock with system clock by executing: ` /sbin/hwclock –systohc`








Follow

Get every new post delivered to your Inbox.