Saturday, January 28, 2012

Fully qualified domain name error

While restarting the apache server, we may get 'Your server does not have a fully qualified domain name.' To solve this problem, we go to httpd.conf file.
/etc/apache2/httpd.conf
Add the domain name that is pointed to this IP address.
ServerName localhost
Then restart the apache web server.
sudo /etc/init.d/apache2 restart

See the book OpenCart 1.4 Template Design Cookbook.
See the book Joomla Mobile Development Beginners Guide




List of my works:

Opencart Extensions:

  1. Product Based Quantity Wise Shipping: Find it here.
  2. OpenSSLCOMMERZ: integrate SSLCOMMERZ with opencart: Find it here.
  3. Fine Search v.1.0 - Improves Opencart search feature to find relevant: Find it here.
  4. Opensweetcaptcha - An easy way to generate attractive captcha for your system!: Find it here.
  5. Custom Field Product - add unlimited custom fields to the product form: Find it here.
  6. Formcaptcha - add captcha on the register page: Find it here.

My Books:

  1. OpenCart 1.4 Template Design Cookbook.
  2. Joomla Mobile Development Beginners Guide

perl warning setting locale failed

In Ubuntu, we get the locale setting failed error. Your system locale is not configured properly. Then we set the default language in our system with the following commands.
sudo /usr/bin/localedef -i en_US -f UTF-8 en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

See the book OpenCart 1.4 Template Design Cookbook.
See the book Joomla Mobile Development Beginners Guide




List of my works:

Opencart Extensions:

  1. Product Based Quantity Wise Shipping: Find it here.
  2. OpenSSLCOMMERZ: integrate SSLCOMMERZ with opencart: Find it here.
  3. Fine Search v.1.0 - Improves Opencart search feature to find relevant: Find it here.
  4. Opensweetcaptcha - An easy way to generate attractive captcha for your system!: Find it here.
  5. Custom Field Product - add unlimited custom fields to the product form: Find it here.
  6. Formcaptcha - add captcha on the register page: Find it here.

My Books:

  1. OpenCart 1.4 Template Design Cookbook.
  2. Joomla Mobile Development Beginners Guide

Infinite loop detected in JError

You may sometime come up with this error message in Joomla. Don't get scared. This means some thing have misconfigured your configuration file in joomla. So, check your configuration.php file for errors. Thanks.
See the book OpenCart 1.4 Template Design Cookbook.
See the book Joomla Mobile Development Beginners Guide




List of my works:

Opencart Extensions:

  1. Product Based Quantity Wise Shipping: Find it here.
  2. OpenSSLCOMMERZ: integrate SSLCOMMERZ with opencart: Find it here.
  3. Fine Search v.1.0 - Improves Opencart search feature to find relevant: Find it here.
  4. Opensweetcaptcha - An easy way to generate attractive captcha for your system!: Find it here.
  5. Custom Field Product - add unlimited custom fields to the product form: Find it here.
  6. Formcaptcha - add captcha on the register page: Find it here.

My Books:

  1. OpenCart 1.4 Template Design Cookbook.
  2. Joomla Mobile Development Beginners Guide

Friday, January 27, 2012

Sample Virtual Host File

We use virtual hosts for our web sites. I have added a sample virtual hosts here. I have removed indexes option, so none can't browse folders if there is no index file. Also disabled MultiViews option. I have renamed the .htaccess file name to myobscurefilename and controlled limited access to it.


  # Admin email, Server Name (domain name) and any aliases
  ServerAdmin test@domain.com
  ServerName  www.domain.com
  ServerAlias domain.com


  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.php index.html
  DocumentRoot /home/test/public_html/domain.com/public

  
   Options FollowSymLinks -Indexes -MultiViews
   AllowOverride All
  
  
  AccessFileName .myobscurefilename
  
    Order allow,deny
    Deny from all
    Satisfy All
  

  # Custom log file locations
  LogLevel warn
  ErrorLog  /home/test/public_html/domain.com/logs/error.log
  CustomLog /home/test/public_html/domain.com/logs/access.log combined



See the book OpenCart 1.4 Template Design Cookbook.
See the book Joomla Mobile Development Beginners Guide




List of my works:

Opencart Extensions:

  1. Product Based Quantity Wise Shipping: Find it here.
  2. OpenSSLCOMMERZ: integrate SSLCOMMERZ with opencart: Find it here.
  3. Fine Search v.1.0 - Improves Opencart search feature to find relevant: Find it here.
  4. Opensweetcaptcha - An easy way to generate attractive captcha for your system!: Find it here.
  5. Custom Field Product - add unlimited custom fields to the product form: Find it here.
  6. Formcaptcha - add captcha on the register page: Find it here.

My Books:

  1. OpenCart 1.4 Template Design Cookbook.
  2. Joomla Mobile Development Beginners Guide

Wednesday, January 25, 2012

why use virtual hosts?

We use virtual hosts for our websites. Why we use them? Let's discuss it here with bullet points(I don't like theoritical talking).
1. Virtual hosts enables us to use same machine, same resources for multiple applications. Each application acts like its running on its own hosting server.
2. The sessions and cookies are stored against their own domain name set on the virtual hosts.
See the book OpenCart 1.4 Template Design Cookbook.
See the book Joomla Mobile Development Beginners Guide




List of my works:

Opencart Extensions:

  1. Product Based Quantity Wise Shipping: Find it here.
  2. OpenSSLCOMMERZ: integrate SSLCOMMERZ with opencart: Find it here.
  3. Fine Search v.1.0 - Improves Opencart search feature to find relevant: Find it here.
  4. Opensweetcaptcha - An easy way to generate attractive captcha for your system!: Find it here.
  5. Custom Field Product - add unlimited custom fields to the product form: Find it here.
  6. Formcaptcha - add captcha on the register page: Find it here.

My Books:

  1. OpenCart 1.4 Template Design Cookbook.
  2. Joomla Mobile Development Beginners Guide

Tuesday, January 17, 2012

Enable Tab to pre-populate file name in vim

If you create a new user account in linux, then pressing Tab won't bring a filename with it's initials. To enable Tab you need to edit the passed file. Let's see how we can do it. 1. Create a user with:
useradd -d /home/testuser -m testuser
Here -d takes the user directory path and -m creates the user directory. you can use -p to set a password in the command. 2. To set a password use:
passed testuser
Then enter your password and retype it. 3. Now if you go to /home/testuser directory you will see .bashrc and .profile files. .bashrc file is used whenever a new tab opened in the console and .profile is used only for the first time while an authentication is done. Now we will change the /etc/passwd file. open the file and you will see your newly created user is listed there. There is sh beside his name. Change it to bash, like the following:
testuser:x:1003:1004::/home/testuser:/bin/bash
Now you will see that Tab is working in your console under your new user.
See the book OpenCart 1.4 Template Design Cookbook.
See the book Joomla Mobile Development Beginners Guide




List of my works:

Opencart Extensions:

  1. Product Based Quantity Wise Shipping: Find it here.
  2. OpenSSLCOMMERZ: integrate SSLCOMMERZ with opencart: Find it here.
  3. Fine Search v.1.0 - Improves Opencart search feature to find relevant: Find it here.
  4. Opensweetcaptcha - An easy way to generate attractive captcha for your system!: Find it here.
  5. Custom Field Product - add unlimited custom fields to the product form: Find it here.
  6. Formcaptcha - add captcha on the register page: Find it here.

My Books:

  1. OpenCart 1.4 Template Design Cookbook.
  2. Joomla Mobile Development Beginners Guide