Saturday, December 11, 2010

Fatal error: Class 'PMA_Message' not found in /usr/local/cpanel/base/3rdparty/phpMyAdmin/lib or phpMyAdmin Fatal: PMA_Message::rawError line 233 cp

You may also get asked for a username/password and when you put in the cPanel account information you get the Fatal error.

From the looks of it the cPanel accounts user has lost connection to the MySQL or be it that it does not know what the username/password is for the account to access MySQL. There is a simple fix.

Log into WHM
SQL Services
Change MySQL DB Owner Password
Select the User from the drop down list
Either put in the cPanel User’s password or Generate a new one
Change Password.
Done.

Log back in as the cPanel User and you should have access via phpMyAdmin again.

Comments and feed back welcome

Thursday, December 9, 2010

Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit if necessa

Fix for infinite loops
An error message related to this isRequest exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.or you may seeRequest exceeded the limit,probable configuration error,Use 'LogLevel debug' to get a backtrace, orUse 'LimitInternalRecursion' to increase the limit if necessary


RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [L]

Wednesday, December 1, 2010

Plesk failed to start due to drwebd service

service psa stopall

service psa start

OR

Running plesk without drweb.

In /etc/init.d/psa

comment out the line,
service_after_psa="drwebd"

then service psa stopall
service psa start

it should start without drweb

Monday, November 22, 2010

How to increase MaxClients in Apach2

You can add the following to your httpd.conf file

==
ServerLimit 1500
MaxClients 1500
==

Usually ServerLimit value will be absent and the default value is 256.

Thank you

Monday, October 4, 2010

MySQL time zone different from system time zone

In some situations, the system time zone will be different than the one in MySQL, even though MySQL is set to use the system time zone. This normally means that a user has changed the system time zone, but they haven't started MySQL to cause it to change as well.

$ date
Sun Jul 1 11:32:56 UTC 2007
mysql> show variables like '%time_zone%';
+------------------+--------+
| Variable_name | Value |
+------------------+--------+
| system_time_zone | CDT |
| time_zone | SYSTEM |
+------------------+--------+
2 rows in set (0.00 sec)
If you find yourself in this situation, just restart MySQL and the situation should be fixed:

mysql> show variables like '%time_zone%';
+------------------+--------+
| Variable_name | Value |
+------------------+--------+
| system_time_zone | UTC |
| time_zone | SYSTEM |
+------------------+--------+
2 rows in set (0.00 sec)

Thursday, September 30, 2010

Installing zend optimizer 3.3 in cpanel

Run this command

/scripts/installzendopt 3.3.0
[~]# /scripts/installzendopt 3.3.0
Installing Zendopt
Determining PHP version
Installing Zend Optimizer binary
Activating Zend Optimizer in /usr/local/lib/php.ini
Zend Optimizer activated

[~]# php -v
PHP 5.2.13 (cli) (built: Jul 14 2010 18:00:25)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v3.3.20, Copyright (c) 2002-2010, by ionCube Ltd., and
with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies

Tuesday, September 7, 2010

Changing cPanel servers main IP or full IP address pool

Changing main shared server IP.


/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/network
/etc/hosts


Then add the cpanel license to the new IP.
Update cPanel configurations.

replace $oldip $newip -- /var/cpanel/mainip
replace $oldip $newip -- /var/cpanel/userdata/*/*
replace $oldip $newip -- /var/named/*.db
replace $oldip $newip -- /etc/*
service named restart
/scripts/rebuildhttpconf

If you are adding new block IP's

1) Add the IP through the cpanel.
2) /etc/init.d/ipaliases restart

Thursday, May 6, 2010

How to Disable Telnet

How to Disable Telnet

SSH into server and login as root.
At shell command prompt type the following command and press Enter. This example use pico to edit text file, you can use vi or other text editor if you want.
pico -w /etc/xinetd.d/telnet

Locate the following line:
disable = no

Change the “disable = no” to “disable = yes” (no to yes).

Save and exit.
Restart the inetd service by using the following command:
/etc/rc.d/init.d/xinetd restart

Turn off Telnet through chkconfig as well because it can still start through that:
/sbin/chkconfig telnet off

How to Disable Telnet

How to Disable Telnet

SSH into server and login as root.
At shell command prompt type the following command and press Enter. This example use pico to edit text file, you can use vi or other text editor if you want.
pico -w /etc/xinetd.d/telnet

Locate the following line:
disable = no

Change the “disable = no” to “disable = yes” (no to yes).

Save and exit.
Restart the inetd service by using the following command:
/etc/rc.d/init.d/xinetd restart

Turn off Telnet through chkconfig as well because it can still start through that:
/sbin/chkconfig telnet off

Saturday, April 24, 2010

Disabling root Login

Security Tip: Disable Root SSH Login on Linux

One of the biggest security holes you could open on your server is to allow directly logging in as root through ssh, because any cracker can attempt to brute force your root password and potentially get access to your system if they can figure out your password.

It’s much better to have a separate account that you regularly use and simply sudo to root when necessary. Before we begin, you should make sure that you have a regular user account and that you can su or sudo to root from it.

To fix this problem, we’ll need to edit the sshd_config file, which is the main configuration file for the sshd service. The location will sometimes be different, but it’s usually in /etc/ssh/. Open the file up while logged on as root.

vi /etc/ssh/sshd_config

Find this section in the file, containing the line with “PermitRootLogin” in it.

#LoginGraceTime 2m
#PermitRootLogin no
#StrictModes yes
#MaxAuthTries 6

Make the line look like this to disable logging in through ssh as root.

PermitRootLogin no

Now you’ll need to restart the sshd service:

/etc/init.d/sshd restart

Now nobody can brute force your root login, at least.

Saturday, January 30, 2010

[error] mod_ssl: Init: (domainname.com:443) Unable to configure verify locations for client authentication

commented out the SSLCACertificateFile line and then restart httpd

# SSLCACertificateFile /usr/share/ssl/certs/domainname.com.cabundle

No space left on device: mod_rewrite: could not create rewrite_log_lock

If you are getting

No space left on device: mod_rewrite: could not create rewrite_log_lock

error while restarting Apache then do this to fix it (replace Apache with the name of the

user apache runs as):

ipcs -s | grep apache | perl -e while () { @a=split(/s+/); print `ipcrm sem $a[1]`}

Wednesday, January 27, 2010

Find out my Linux distribution name and version from shell

To find out what version of Linux (distro) you are running, enter the following command at the shell prompt:
$ cat /etc/*-release

Monday, January 11, 2010

How to install ioncube loader in directadmin

ionCube can be installed by following these two steps:

1/ Extract the correct ionCube loader tarball (go here to find the right one for your system) to the /usr/local directory.

e.g.
curl -O http://downloads2.ioncube.com/loader...in_x86.tar.bz2
tar xjfC ioncube_loaders_lin_x86.tar.bz2 /usr/local

2/ You will need to append a line to your PHP.INI to enabel ionCube. ionCube's install helper will give you the exact line to add:
php /usr/local/ioncube/ioncube-loader-helper.php

The line to be appended will look something like:
zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.2.so

After that's appended, ionCube should work. If it's working, php -v should list ionCube as a loaded extension.

How to point Subdomain to a different server

1. Log into account
2. Open the Domain Manager
3. Click the domain you are working with
4. Click “Total DNS Control and MX Records”
5. The first group in this area should be A (Host), on the top right of this bar, click Add New A Record
6. Enter the host name, in my case it was “blog.aremysitesup.com”
7. Enter the IP address of the server you wish to point at.