Posts

Showing posts from March, 2012

Changing file permissions of a folder and all of its subfolders and files in Ubuntu.

Changing file permissions in Ubuntu is a very essential thing. If proper file permissions are not set to folders or files, it is not possible to execute any PHP or HTML files from the browser using localhost. The following command can be used to set file permission for any file or folder. sudo chmod 755 /var/www/myfolder In the above example

How to fix "url /phpmyadmin was not found in this server" problem in Ubuntu (linux)?

Sometimes after installing LAMP, when you try to open the phpmyadmin in your browser you might get the error like this: "Not Found The requested URL /phpMyAdmin was not found on this server. Apache/2.2.12 (Ubuntu) Server at localhost Port 80" This is likely to be caused by not checking apache2 during installation. To reinstall you can use the following command:

How to install LAMP in Ubuntu (linux)

LAMP stands for Linux, Apache, MySQL and PHP/Python. Installing and configuring LAMP is not a very complicated thing in Ubuntu, its just a matter of few lines of commands via the command line. This post will show you how to install PHP5, Apache2, MySQL and phpMyAdmin in Ubuntu. Installing Apache 1. Open the terminal and type the following command.

Adding facebook comment box to your blogger

Few days ago I wrote about adding facebook comment box to your website. To add similar comment box to your blogger a few more steps are required. Adding this box helps users to comment to your posts easily in one click without having the blogger account. Let us see how we can embed it.

Adding facebook comment box to your website

Image
Adding Facebook comment box to your website is not as difficult as it used to be about an year ago. When I first used Facebook comment in one of my website about an year ago, I first had to use facebook connect and then write a lot of complicated fbml codes. It was a hell full of complications. But now it has become very easy all because of the Facebook Social Plugins. It just copy paste of some html codes and you are done. The following steps will guide you through using it.

SQL Injection and its prevention in PHP

What is SQL injection? SQL injection is one of the common attacks in web industry which uses SQL statements in the web form to execute a query in the wrong way and make attacks like making an unauthorised login or making wrong access to the data in the database. SQL injection usually occurs when users are asked for inputs through the HTML forms. Let us see a common example of SQL injection. Suppose we have a user login form that asks for their username and password. We use select statement for validating the username  which is stored in the database.