April 28, 2013 asvignesh
Some time back there was only one way to run MySQL on the cloud. Setup cloud , install MySQL and maintain it yourself the hard thing is managing backups, handling replication failures, maintaining server. Then AWS RDS came along and can be thought of as a PaaS for MySQL – it hides all the complexities behind the scenes and you only concern yourself with the database and not the database software.  WHY RDS: Simple UI to automate backup , setting backup time and retention copies Easy to restore backup snapshots AWS will apply patches that are security and durability related….
April 28, 2013 asvignesh
Here is the some tips for the web admins and the web developers to speed up the image heavy website The Major drawback in the Image heavy websites is it takes more time to load , user lose their patience and just navigate away from your website Don’t use Flash Animation is unnecessary, but if you feel you need it, try: Spritely, a free jQuery plugin that lets you create animation with HTML and JavaScript or create your own animated GIFs using Photoshop or GIMP ( Image editor ) Use storage service for images Most browsers will only load two or…
April 28, 2013 asvignesh 1Comment
Removing index.php in Codeigniter application url in godaddy shared hosting server Create the .htaccess file under root of application directory RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond $1 !^(index.php|robots.txt) RewriteRule ^(.*)$ index.php?/$1 [L] If you are getting “no input file specified” ( codeigniter / wordpress ) Login to godaddy account Goto hosting Under settings frame select file extension management Here you will find this “.php PHP 5.2.x FastCGI” click on edit button change it to “.php PHP 5.2.x” no need to change for .php5, .php4 Thats it  
April 21, 2013 asvignesh 1Comment
CodeIgniter is a powerful PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications. If you’re a developer who lives in the real world of shared hosting accounts and clients with deadlines, and if you’re tired of ponderously large and thoroughly undocumented frameworks You can create a dynamic sub-domains store_name.asvignesh.in username.asvignesh.in Step 1: DNS Configuration First, we need to configure our DNS settings to make all subdomains resolve to a single address. If you are working on a live server, then you will have to change your…
April 14, 2013 asvignesh
We can submit the html form page by pressing submit button and the shortcut way is pressing enter ( return ) button on keyboard after filling up the form Here is the post to explain how to submit a form by pressing enter button using jQuery Generally, a form is submitted when the user presses a submit button. However, sometimes, you may need to submit the form when the user press return key ( enter key) Here is the code to submit the form by pressing the enter key <html> <head> <script src=”https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js”></script> <script> function formSubmit() { document.getElementById(“frm1”).submit(); } $(‘#submit_form’).keypress(function…
April 14, 2013 asvignesh
Here is the solution to fetch the data from another Database instance in word press How To Use WPDB Class to connect and fetch data from another database host Let’s say you’ve installed wordpress into the database wp_wordpress and you want to fetch some data from another independent database which has nothing to do with wordpress (ex. mydb). Here’s how you can do it. Querying for Data Using WPDB Now, here’s the trick. You have to instantiate a new WPDB instance $mydb= new wpdb(‘username’,’password’,’db_name’,’db_host’); $rows = $mydb->get_results(“select columnName from tableName”); foreach ($rows as $obj) { echo $obj->columnName; } That saves…
April 14, 2013 asvignesh
Lots of web servers are running in LAMP stack, as ubuntu is easy to install and configure and many advantages people prefer ubuntu server,  Ubuntu server is completely command based , you need to do all the operation using the ubuntu Terminal… For the Ubuntu Desktop users who are not very good in ubuntu commands Here is the solution to use server like desktop in amazon EC2 instance. Create a new ubuntu server instance in amazon EC2 Make sure the AWS security group has port 22 open for your Instance IP address you are using. ( for SSH access )…
April 14, 2013 asvignesh
Highlight your php code in your website or in your blog post Instead of using external tools or third party code to highlight the syntax of php code in your website you can use the inbuilt function of php highlight_string or highlight_file Highlight_string is the function to highlight the php syntax of the block of code Here is the example for the highlight_string <?php $code = ‘ <?php //array with files to allow $allowed = array(“index.php”, “menu.php”, “about.php”); // get the filename $file = $_GET[file]; if(file_Exists($file)){ if(in_array($file, $allowed)){ // check if it is part of the allowed list highlight_file($file); //highlight…
April 7, 2013 asvignesh
Session often breaks in codeigniter ??? Here is the fix ! I developed e-commerce website using php codeigniter and it is using database to store session values. But the session is lost if it has more data in it I have spent some days checking about it and changed the third party session library , it has lots of limitations again i switched back to codeigniter default session library and trying to fix the issue finally i found out the issue in it. It was failing to unserialize the session data stored in the user_data field in ci_session table So…
April 7, 2013 asvignesh
Best practises in checking codeigniter sessions There are many practices in checking the session conditions for whether the user is logged in or not Usually we check in the codeigniter controllers function my_function() { $user = $this->session->userdata(‘user_id’); if (!isset($user)) { $logged_in = false; } else { $logged_in = true; } } This 4-8 lines of code you need to check in every controller , So you can create a codeigniter library and call the library function in every controller , It is easy to code and also in modifying the code  Create a my_library.php file in application/libraries Copy the following…