Bloghology.org | The Bloggers Standard 
Log In
EmailAddress :
Password :
 
Sign Up
First Name :
Last Name :
EmailAddress :
Password :
ReType Password :
 
Search
Text :
Search From :
 
Email To Friend
Your Name :
Your EmailAddress :
Friends Name :
Friend EmailAddress :
 
Post Article Comments
Name : 
EmailAddress : 
URL : 
Comments : 
 
 
 » Blogging Lessons
Louis Liem
Author Picture
Advanced Security Procedures for Your Blog

Rate Louis Liem :  Current Rating : 3/5
Rate this Article :   Current Rating : 3/5
Posted on : September 29, 2008   Views : 174   Article Font Size :  

In addition to standard security procedures I listed to be applied on your blog, I was also suggested by my hosting service to take extra time to harden my backend security. Here are some tips from HostMonster`s Level 1 Support, Jon Bryson:

  1. Set register_globals to OFF
  2. Turn off Display Error/Warning Messages, set error_display to ZERO
  3. Never run unescaped queries
  4. Validate all user inputs. Items on forms, in URLs and so on
  5. Move config and files containing passwords to mysql to a secure directory outside of the public_html folder
  6. Access control, you don`t want users to have access to admin function or clean up scripts
  7. htaccess is your friend. Use it to deny people (HostMonster also have an easy deny manager too in the cpanel)
  8. PHP can parse any valid script, whether it is called foo.php, very_long_name.php.php.php, or even willeymtard.bat. Using the default extension of .php means that before your hackers start, you have already told them you are using PHP. As mentioned, you can use any filename for your scripts if you are using PHP for every script on your server, consider using the .html extension for your scripts and making PHP parse HTML files. You can change your file extension by adding this line to the htaccess or turn it on via the add type handler in the cpanel (AddType application/x httpd php .php)
  9. Sometimes hackers will try to screw up your database by inserting SQL code into your form input fields (SQL injection attacks). They can for example, insert code that could delete all the data in your database! To protect against this, you need to use this PHP function:

mysql_real_escape_string()
This function escapes (makes safe) any special characters in a string (programmers call text a `string`) for MySQL. Example:
$name = $_REQUEST[`name`];
$safe_name = mysql_real_escape_string($name);
Now you know the variable $safe_name, is safe to use with your SQL code.

Keep the PHP code to yourself. If anyone can see it they can expliot vulnerabilities. You should take care to store your PHP files and the necessary passwords to access your MySQL databases in protected files or folders. The easy way to do this is to put the database access passwords in a file with a .inc.php extension (such as config.inc.php), and then place this file in a directory which is above the servers document root (and thus not accessible to surfers of your site), and refer to the file in your PHP code with a require_once command. By doing things this way, your PHP code can read the included file easily but hackers will find it almost impossible to hack your site.

You can find more information about hardening your PHP scripts at: phpsec.org/projects/guide/
Some of these instructions require more knowledge to be applied. If you`re not ready to get deeper with modifying database and server settings, you may feel safe already by performing the standard security procedures.

Do you like the article? Louis also blogs at HomeBiz Resource. Find and read more useful information on blogging, traffic and SEO inside.
Post Article Comments
Name : 
EmailAddress : 
URL : 
Comments : 
 
Recently Approved Articles
Most Viewed Articles
Random articles
Most Rated Articles
 
Article Categories
♦ Blog Reviews ♦ Bloggers TOP 100 list ♦ Blogging - Traffic Building Tips
♦ Blogging Lessons ♦ Blogging News ♦ Blogging Platforms
♦ Editorial ♦ Interviews ♦ Make Money Online
♦ Q & A Section ♦ SEO ♦ Whats Next In Blogging
Home| About Us| Terms Of Use| Privacy Policy| Submission Guide| Contact Us  
Copyright © 2007-2008  All Rights reserved.