Archive for the ‘cpanel’ Category

PHPMyAdmin :: Existing configuration file (./config.inc.php) is not readable.

February 12, 2008

==
When I try to access phpmyadmin on a cPanel server, i get the following error:

Existing configuration file (./config.inc.php) is not readable.
==

Solution:

#cd /usr/local/cpanel/base/3rdparty/phpMyAdmin
#chown cpanel.cpanel config.inc.php

cPanel :: Maximum number of connections to IMAP server from any particular IP

January 22, 2008

Maximum number of connections to IMAP server from any particular IP is set
at /usr/lib/courier-imap/etc/imapd

Check the following parameters:

MAXPERIP
MAXDAEMONS

Once you have made any changes you need to restart imapd.

Change the ownership of files in public_html to user.user in a cpanel server

January 22, 2008

A rather crude one, need to customize further ..

#!/bin/bash
cd /var/cpanel/users
for user in *
do
chown -R $user.$user /home/$user/public_html/*
done

ps:I didn’t write this script. I dunno if uit would work for you. 😛

Horde error : Warning: send(Net/SMTP.php) [function.send]: failed to open stream: No such file or directory in /usr/local/lib/php/Mail/smtp.php

January 16, 2008

Horde was displaying the following error when trying to send emails.

===
Warning: send(Net/SMTP.php) [function.send]: failed to open stream: No such file or directory in /usr/local/lib/php/Mail/smtp.php on line 206

Warning: send() [function.include]: Failed opening ‘Net/SMTP.php’ for inclusion (include_path=’/usr/local/cpanel/base/horde/lib:.:/usr/lib/php:/usr/local/lib/php’) in /usr/local/lib/php/Mail/smtp.php on line 206

===

#pear install Net_SMTP

fixed the issue for me.

Syncing cPanel scripts from cPanel.net

September 29, 2007

rsync -av rsync://rsync.cpanel.net/scripts/ /scripts/

Why doesn’t SpamAssassin work in cPanel 11?

September 4, 2007

Source: cPAnel FAQ.
—————————

Make sure that you are using Perl 5.8.8 which is recommended with cPanel 11.

Prior to upgrading Perl, it is a good idea to ensure that each module gets carried over to the update Perl version using the “autobundle” CPAN feature. You will need to execute this command via root in SSH:

perl -MCPAN -e ‘autobundle’

Once this is complete, you should have the the following outputted before returning to the shell:

‘Wrote bundle file /home/.cpan/Bundle/Snapshot_2007_08_16_00.pm’

Make a note of the filename before proceeding with the update.

– To update to Perl 5.8.8 on Linux based servers:

cd /root
wget http://layer1.cpanel.net/perl588installer.tar.gz
tar -zxf perl588installer.tar.gz
cd perl588installer
./install

– To update to Perl 5.8.8 on FreeBSD based servers:

cd /usr/ports/lang/perl5
make && make install

Once the update is complete, you can restore all the previously installed modules from the CPAN bundle that was created by executing:

perl -MCPAN -e ‘install Bundle::Snapshot_2007_08_16_00’

Make sure that you replace the bundle name with the one that was generated earlier.

We should now make sure that all modules required by cPanel 11 are installed and restart cPanel:

/usr/local/cpanel/bin/checkperlmodules
/usr/local/cpanel/startup

List IPs access HTTP sorted by number of connections

September 4, 2007

netstat -plan | grep :80 | awk ‘{print $5}’ | sed ‘s/::ffff://g’ | cut -d: -f1 | sort | uniq -c | sort -n

Postgres Databases not displayed on cpanel

September 4, 2007

This troubleshoting will help you if:

* If you have databases on postgres and they’re not being showed on
cpanel * If you’re trying to create a database or an user on postgres and
they’re not being showed as created on cpanel.
* It is possible that mysql is giving same results if postgres is with
problem.
PROBLEM:
Postgres isn’t showing any errors on cpanel, because it does not return
any error. The most common error is that postgres cannot connect with cpanel
password.

RESOLUTION
===========

You can try just go to section OPTIONAL – SKIPING POSTGRES PERMISSION and
then on Cpanel and change by Cpanel postgres password or, if it doesnt work,
do all this tutorial steps.
# loged as root
$ loged as postgres user

1) MAKING BACKUP OF OLD DATABASE

# su – postgres
$ pg_dumpall > /tmp/dbdo28.out
$ exit

If an error like ‘pg_dumpall: could not connect to database template1:
FATAL: Password authentication failed for user “postgres”‘ appear, you’ll
need to do section 1.1 above, otherwise skip to section 2.

OPTIONAL – SKIPING POSTGRES PERMISSION
Modify /var/lib/pgsql/data/pg_hba.conf from ‘md5’ to ‘trust’

It should contain the following:

local all all trust
host all all 127.0.0.1 255.255.255.255 trust

Restart postgres:
# service postgresql restart

2) REBUILDING POSTGRES DEFAULT DATABASES

# mv -f /var/lib/pgsql /var/lib/pgsql.old
# yes | /scripts/installpostgres

3) RESTORING YOUR BACKUP

# su – postgres
$ psql -f /tmp/dbdo28.out template1
$ exit

4) CHANGING POSTGRES CONFIG AT CPANEL
change pgsql password on cpanel “postgres config” option to something
random and click on intall config

5) MOVING OLD POSTGRES DATABASE TO A SAFER PLACE
make sure you have an old copy
# mv /tmp/dbdo28.out /root
6) ALLOWING CONNECTIONS BY TCP/IP
Edit /var/lib/pgsql/data/postgresql.conf and change tcpip_socket from
false to true.

7) RESTARTING POSTGRES

Restart postgres with
# service postgres restart
———————————————————

Ref:
http://forums.cpanel.net/showthread.php?t=36992
http://forums.cpanel.net/showthread.php?t=37219
http://forums.cpanel.net/showthread.php?t=27416
==========================