RSS

Daily Archives: January 11, 2012

How to Reset SSH Port Through WHM

Some time we edit the file called sshd_config which is under /etc/sshd_config and make changes and we suddenly logged out of the server and when we try to login through SSH we are thrown out  😦  .

Just do following steps to Reset the SSH port through WHM:

###############################################

1] Log in to WHM as root user and browse following URL.

http://xxx.xxx.xxx.xx:2086/scripts2/autofixer

Here xx = Server’s IP address

2] To reset the sshd_config file insert “safesshrestart” in following autofixer window.

3] If you were using any other port for SSH,directly access the server  via SSH and default port which is 22 and make the changes and restart SSH service

That’s it !!

###############################################

You  can now enter into your server via SSH.Cheers!! 8)

Advertisements
 
Leave a comment

Posted by on January 11, 2012 in Uncategorized

 

ERROR 1045 (28000): Access denied for user ‘admin’@’localhost’

For solving above Issue,Just use your admin password or fire following command on shell:

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

mysql -uadmin -p`cat /etc/psa/.psa.shadow`

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

That’s it!!
It will let you in mysql.

 
Leave a comment

Posted by on January 11, 2012 in Uncategorized

 

HTTP error codes

There are multiple HTTP codes that you may come across. Below you can find a summary of the most popular HTTP error codes:

“200 OK” – You will not see this code when browsing a regular page. It means that the requested document has been processed and sent to you.

“301 Moved Permanently” – Often web designers create the so-called 301 redirects. This means that instead of the file you are browsing to, the server will point you to a different directory or a file set in the redirect rules.

“400 Bad Request” – The Web server considers the data stream sent by the client (your Web browser) ‘malformed’ i.e. it has not sent a complete HTTP request. In such cases the web server is unable to process the request. Almost always this error is caused by bad programming.

“401 Unauthorized” – You are most probably trying to access a password protected directory using wrong credentials. In such cases you should check whether you are using the correct login details. If you wish to have your credentials reset, you can do this using the “Password Protect Directories” tool in your cPanel.

“403 Forbidden” – This error message means that you are trying to open a folder or a file you do not have access to. If you are receiving this error message on your website, you should check the .htaccess files in your web hosting account for any restrictive rules.

“404 Not Found” – You are browsing to a non-existent page or a folder. In such cases you should check if the link you are trying to access is correct. In addition, if any SEF functionality on your pages is not working correctly, your application may forward you to the wrong URL.

“500 Internal Server Error” – The most common reasons for this error are bad script code, an invalid .htaccess file, wrong file/folder permissions. For more information on that matter, you can check on

 
Leave a comment

Posted by on January 11, 2012 in Uncategorized

 

How to see web stats with out login to cpanel

Follow the below Steps:

[root@server~]# cd /home/user/public_html

Open the .htaccess file. If it does not exist, create it.

[root@server~]# vi .htaccess

Insert the following line in the file:

Options +FollowSymLinks

Now lets create a symbolic link for the webalizer stats so it can be accessed without logging in to cpanel.

The webalizer stats for the domain are always available under /home/user/tmp/webalizer.

We will create a symbolic link for this.

  [root@server~]# ln -s /home/user/tmp/webalizer web

Assign proper ownership

[root@server~]# chown -h user.user web
chgrp -h user.user web  
Assign appropriate permissions as well.

[root@server~]# chmod 755 /home/user/tmp/webalizer

Now you can access the webalizer stats without login to cPanel.

Access http://yourdomain.com/web to view the webalizer stats.

Now you be able to see the webstats. 😉

Enjoy!!

 
Leave a comment

Posted by on January 11, 2012 in Uncategorized

 

PHP Warning: Unknown: POST Content-Length of 113 bytes exceeds the limit of -1988100096 bytes in Unknown on line 0

While login to drupal the login page again redirectes to login page and while checking error logs we can see the following logs:

PHP Warning:  Unknown: POST Content-Length of 113 bytes exceeds the limit of -1988100096 bytes in Unknown on line 0

Solution:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Just copy the servers php.ini in the public_html and change following value:
upload_max_filesize = 10M OR 20M
memory_limit = 128M
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thats it!!

 
Leave a comment

Posted by on January 11, 2012 in Uncategorized

 

ModSecurity: Rule execution error – PCRE limits exceeded (-8)

After browsing site you get a blank page and the Apache error logs display following error logs

    [Tue Jul 06 12:15:37 2010] [error] [client XX.XX.XX.XX] ModSecurity: Rule execution error – PCRE limits exceeded (-8): (null). [hostname “www.test.com”] [uri “/forum/login.php”] [unique_id “TDMQWW3LaKoAAGiQ0EYAAAAP”]

In order to solve this error follow following steps:

1) Login to the server as root.

2)Go to directory /usr/local/apache/conf.

   [root@server~] # cd /usr/local/apache/conf

3)Create a file pcre_modsecurity_exceeded_limits.conf and insert following lines in it.

[root@server conf]# vi pcre_modsecurity_exceeded_limits.conf

SecPcreMatchLimit 150000
SecPcreMatchLimitRecursion 150000

4) Save and quit the file.

5) Please ensure the permissions assigned for the file are 600.

[root@server ~]# chmod 600 /usr/local/apache/conf/pcre_modsecurity_exceeded_limits.conf

6) Now open the file /usr/local/apachec/conf/modsec2.user.conf .

[root@server ~]# vi /usr/local/apachec/conf/modsec2.user.conf

7)Locate the line “<IfModule mod_security2.c>“

8 ) Add following line just below the above mentioned line.

Include “/usr/local/apache/conf/pcre_modsecurity_exceeded_limits.conf”

9)Save and quit the file.

10) Now just restart your apache and mysql service. The issue should be fixed now.

 
Leave a comment

Posted by on January 11, 2012 in Uncategorized

 

No input file specified :Joomla Error

After updating Joomla to new version you might receive an error on your website  called:

No input file specified

So for quering above error do the foolwing steps:

Login to your Joomla admin area and go to Global Config > Site > and making sure ‘no’ is ticked on the “Search Engine Friendly Url’s” option.
 That’s it now try accessing your web site the error will be vanished. 😉

 
Leave a comment

Posted by on January 11, 2012 in Uncategorized