Browse » Home » Archives for 2011
If you are receiving the following error code while Horde webmail login.
Horde "A fatal error has occurred Could not connect to database for SQLSessionHandler. Details have been logged for the administrator"
Solution::
NOTE: You can fix it only if you have a root user privileges which means this will be helpful for VPS , Semi-dedicated Servers and Dedicated servers.
1. Check the Horde webmail configuration file
Code:
#vi /usr/local/cpanel/base/horde/config/conf.php
2. You can find the following entry in the conf.php
Code:
$conf['sql']['hostspec'] = 'localhost';$conf['sql']['username'] = 'horde';$conf['sql']['password'] = '';$conf['sql']['protocol'] = 'tcp';$conf['sql']['database'] = 'horde';
3. Try to connect the database horde using the following method
#mysql -uhorde -p
You should obtain the Error.
Code:
"ERROR 1045 (28000): Access denied for user'horde'@'localhost' (using password: YES)"
4. Grant the privilege to the database using the mysql command prompt
Code:
#mysql> grant all privileges on horde.* to horde@localhost identified by '';
You can now login into the Horde Webmail now..!!!
Second solution is that, You can also try checking configuration file /etc/my.cnf and remove skip-innodb if its in there. Restart mysql service to ensure that the error has been fixed and Horde Webmail login works..
Another solution is to repair the table named “SessionHandler” in Horde Database from mysql command Prompt as follows.
Code:
#mysql#mysql> use horde;#mysql> repair table horde_sessionhandler;
These Fixes must fix your Horde webmail login problem..
[Read More...]
Solution::
NOTE: You can fix it only if you have a root user privileges which means this will be helpful for VPS , Semi-dedicated Servers and Dedicated servers.
1. Check the Horde webmail configuration file
Code:
#vi /usr/local/cpanel/base/horde/config/conf.php
2. You can find the following entry in the conf.php
Code:
$conf['sql']['hostspec'] = 'localhost';$conf['sql']['username'] = 'horde';$conf['sql']['password'] = '';$conf['sql']['protocol'] = 'tcp';$conf['sql']['database'] = 'horde';
3. Try to connect the database horde using the following method
#mysql -uhorde -p
You should obtain the Error.
Code:
"ERROR 1045 (28000): Access denied for user'horde'@'localhost' (using password: YES)"
4. Grant the privilege to the database using the mysql command prompt
Code:
#mysql> grant all privileges on horde.* to horde@localhost identified by '';
You can now login into the Horde Webmail now..!!!
Second solution is that, You can also try checking configuration file /etc/my.cnf and remove skip-innodb if its in there. Restart mysql service to ensure that the error has been fixed and Horde Webmail login works..
Another solution is to repair the table named “SessionHandler” in Horde Database from mysql command Prompt as follows.
Code:
#mysql#mysql> use horde;#mysql> repair table horde_sessionhandler;
These Fixes must fix your Horde webmail login problem..
Change Linux timezone
If you are using Fedora / RHEL / Cent OS Linux
Type the redhat-config-date command at the command line to start the time and date properties tool.
# redhat-config-date
OR type setup and select time zone configuration (good for remote ssh text based Linux server sessiob)
# setup
Now, just follow on screen instructions to change timezone
Set timezone using /etc/localtime configuration file [any Linux distro]
Often /etc/localtime is a symlink to the file localtime or to the correct time zone file in the system time zone directory.
Generic procedure to change timezone
Change directory to /etc
# cd /etc
Create a symlink to file localtime:
# ln -sf /usr/share/zoneinfo/EST localtime
OR some distro use /usr/share/zoneinfo/dirname/zonefile format (Red hat and friends)
# ln -sf /usr/share/zoneinfo/EST localtime
OR if you want to set up it to IST (Asia/Calcutta):
# ln -sf /usr/share/zoneinfo/Asia/Calcutta localtime
Please mote that in above example you need to use directory structure i.e. if you want to set the timezone to Calcutta (India) which is located in the Asia directory you will then have to setup using as above.
Use date command to verify that your timezone is changed:
$ date
Output:
Tue Aug 27 14:46:08 EST 2006
Use of environment variable
You can use TZ environment variable to display date and time according to your timezone:
$ export TZ=America/Los_Angeles
$ date
[Read More...]
Type the redhat-config-date command at the command line to start the time and date properties tool.
# redhat-config-date
OR type setup and select time zone configuration (good for remote ssh text based Linux server sessiob)
# setup
Now, just follow on screen instructions to change timezone
Set timezone using /etc/localtime configuration file [any Linux distro]
Often /etc/localtime is a symlink to the file localtime or to the correct time zone file in the system time zone directory.
Generic procedure to change timezone
Change directory to /etc
# cd /etc
Create a symlink to file localtime:
# ln -sf /usr/share/zoneinfo/EST localtime
OR some distro use /usr/share/zoneinfo/dirname/zonefile format (Red hat and friends)
# ln -sf /usr/share/zoneinfo/EST localtime
OR if you want to set up it to IST (Asia/Calcutta):
# ln -sf /usr/share/zoneinfo/Asia/Calcutta localtime
Please mote that in above example you need to use directory structure i.e. if you want to set the timezone to Calcutta (India) which is located in the Asia directory you will then have to setup using as above.
Use date command to verify that your timezone is changed:
$ date
Output:
Tue Aug 27 14:46:08 EST 2006
Use of environment variable
You can use TZ environment variable to display date and time according to your timezone:
$ export TZ=America/Los_Angeles
$ date
How to remove the blocked ip using iptables
1. First check that ip is blocked or not
2. iptables –L –n | grep
DROP all – 125.99.10.123 216.240.157.91
3. to unblock the ip give the command
iptables -D INPUT -s 125.99.10.123 -d 216.240.157.91 -j DROP
Now the ip is unblocked.
[Read More...]
2. iptables –L –n | grep
DROP all – 125.99.10.123 216.240.157.91
3. to unblock the ip give the command
iptables -D INPUT -s 125.99.10.123 -d 216.240.157.91 -j DROP
Now the ip is unblocked.
How do I verify port and IP binding working ?
Use netstat command to find out if Apache is listening on a specific port or not, use:
# netstat -tulpn
# netstat -tulpn | grep :80
# netstat -tulpn | grep :8010
# netstat -tulpn| grep 202.54.1.2:80
[Read More...]
# netstat -tulpn
# netstat -tulpn | grep :80
# netstat -tulpn | grep :8010
# netstat -tulpn| grep 202.54.1.2:80
Linux admin useful commands
1. Check for server load using top command with following options:
Shift p CPU Usage,
Shift m Memory Usage
& check which process is taking load with the help of above two options.
Kill the responsible process using k option.
2. Check for the downloads using
# ps auxw | grep nobody | grep mp3 , jpeg, wmv, mpeg, rar
# ps auxw | grep gzip, backup, fixquota
Suspend the perticular account who is repeatedly downloading the above mentioned files.
3. Check for access & error logs for following options
# tail -f /etc/httpd/logs/access_log | grep 408, zip
# tail -f /etc/httpd/logs/error_log | grep 203
4. Check mail spamming with following commands.
#tail -f /var/log/exim_mainlog | grep sendmail, public_html, tmp
5. Login to WHM of the server and check apache, cpu/memory, mysql status & check for frozen mails in mail queue manager.
6. Check Mysql errors with
# mysqladmin processlist
check the users, command, time & information fields.
7. If you are making changes to httpd.conf then first run # httpd -configtest before restarting httpd to reduce the downtime.
8. Restart the perticular service causing load tomgo hihg with # /scripts/restartsrv_httpd, exim, mysql
[Read More...]
Shift p CPU Usage,
Shift m Memory Usage
& check which process is taking load with the help of above two options.
Kill the responsible process using k option.
2. Check for the downloads using
# ps auxw | grep nobody | grep mp3 , jpeg, wmv, mpeg, rar
# ps auxw | grep gzip, backup, fixquota
Suspend the perticular account who is repeatedly downloading the above mentioned files.
3. Check for access & error logs for following options
# tail -f /etc/httpd/logs/access_log | grep 408, zip
# tail -f /etc/httpd/logs/error_log | grep 203
4. Check mail spamming with following commands.
#tail -f /var/log/exim_mainlog | grep sendmail, public_html, tmp
5. Login to WHM of the server and check apache, cpu/memory, mysql status & check for frozen mails in mail queue manager.
6. Check Mysql errors with
# mysqladmin processlist
check the users, command, time & information fields.
7. If you are making changes to httpd.conf then first run # httpd -configtest before restarting httpd to reduce the downtime.
8. Restart the perticular service causing load tomgo hihg with # /scripts/restartsrv_httpd, exim, mysql
How to create a Test Mail Script?
Login to SSH with root user
cd /home//public_html
Create test phpmail fine
pico phpmail.php
Insert following code in that file
$to = “recipient@example.com”;
$subject = “Hi!”;
$body = “Hi,\n\nHow are you?”;
if (mail($to, $subject, $body)) {
echo(“
Message successfully sent!
“);
} else {
echo(“
Message delivery failed…
“);
}
?>
Then cange the ownership of that file :
chown user.user phpmail.php
Then test the script in browser or in SSH, you will get follwing result, which means php mail function working fine
————————————-
-bash-2.05b# php phpmail.php
X-Powered-By: PHP/4.4.2
Content-type: text/html
Message successfully sent!
[Read More...]
cd /home//public_html
Create test phpmail fine
pico phpmail.php
Insert following code in that file
$to = “recipient@example.com”;
$subject = “Hi!”;
$body = “Hi,\n\nHow are you?”;
if (mail($to, $subject, $body)) {
echo(“
Message successfully sent!
“);
} else {
echo(“
Message delivery failed…
“);
}
?>
Then cange the ownership of that file :
chown user.user phpmail.php
Then test the script in browser or in SSH, you will get follwing result, which means php mail function working fine
————————————-
-bash-2.05b# php phpmail.php
X-Powered-By: PHP/4.4.2
Content-type: text/html
Message successfully sent!
How to install Ioncube Loader ?
Refer the following steps
1) Login into shell through root
2) cd /usr/local/ Download the tar.gz file which is compatible with your server from http://downloads.ioncube.com/wget http://downloads.ioncube.com/loader_…lin_x86.tar.gz
3) Untar the file.tar -zxf ioncube_loaders_lin_x86.tar.gz
4) chown -R root:root /usr/local/ioncube/
5) vi /usr/local/Zend/etc/php.ini (or whatever your path is)
Add the following line before zend_extension
zend_extension=/usr/local/ioncube/ioncube_loader_lin_4.4.so
It would go between these two entries
zend_optimizer.version=2.5.10a
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
Save changes, then:
6) /etc/init.d/httpd restart
[Read More...]
1) Login into shell through root
2) cd /usr/local/ Download the tar.gz file which is compatible with your server from http://downloads.ioncube.com/wget http://downloads.ioncube.com/loader_…lin_x86.tar.gz
3) Untar the file.tar -zxf ioncube_loaders_lin_x86.tar.gz
4) chown -R root:root /usr/local/ioncube/
5) vi /usr/local/Zend/etc/php.ini (or whatever your path is)
Add the following line before zend_extension
zend_extension=/usr/local/ioncube/ioncube_loader_lin_4.4.so
It would go between these two entries
zend_optimizer.version=2.5.10a
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
Save changes, then:
6) /etc/init.d/httpd restart
make_sock: httpd error
If we get following error of while try to restart httpd:httpd not running, trying to start
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
Unable to open logs
Simply log in as root and fire the command which is given below:
netstat -lpn | grep ’0.0.0.0:80′
It will show the result something like:
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 14829/httpd
Then kill the PID and kill all the processes of the service and try to restart it.
root@server [~]# kill -9 14829
root@server [~]# killall -9 httpd
root@server [~]# /etc/init.d/httpd restart
[Read More...]
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
Unable to open logs
Simply log in as root and fire the command which is given below:
netstat -lpn | grep ’0.0.0.0:80′
It will show the result something like:
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 14829/httpd
Then kill the PID and kill all the processes of the service and try to restart it.
root@server [~]# kill -9 14829
root@server [~]# killall -9 httpd
root@server [~]# /etc/init.d/httpd restart
Cannot send emails- RoundCube just shows "Sending Message"
I found a problem with Roundcube, it shows sending message and hangs up there and actually it doesn’t send message anymore. I found the following solution here.
Problem with Roundcube, installed when updated to newest CURRENT release. – Page 3 – cPanel Forums:
vi /usr/local/cpanel/base/3rdparty/roundcube/config/main.inc.php
and changed
$rcmail_config['smtp_user'] = ‘%u’;
to
$rcmail_config['smtp_user'] = ”;
[Read More...]
Problem with Roundcube, installed when updated to newest CURRENT release. – Page 3 – cPanel Forums:
vi /usr/local/cpanel/base/3rdparty/roundcube/config/main.inc.php
and changed
$rcmail_config['smtp_user'] = ‘%u’;
to
$rcmail_config['smtp_user'] = ”;
Subscribe to:
Posts (Atom)