- Open the Control Panel.
- Click on the Network and Sharing Center icon.
- In the View your active networks section, click the Local Area Connection or Ethernet link.
- On the Local Area Connection or Ethernet Status window, click the Properties button.
- In the Properties window, select the Internet Protocol Version 6 (TCP/IPv6) or Internet Protocol Version 4 (TCP/IPv4) connection and click the Properties button. The connection you select depends on the type of Internet protocol in use for your Internet or Network connection.
- In the Internet Protocol properties window, select the Use the following IP address option if not already selected. Specify the new IP address you want to use. You also need to specify the subnet mask and default gateway.
Month: July 2017
Get default post category in WordPress
Please find below code to get default post category
$args = array(
‘type’ => ‘post’,
‘hide_empty’ => 0
$categories = get_categories( $args );
echo $default_category = get_option(‘default_category’);
PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: drupal 7 beta3
If this issue getting you have to increase max_allowed_packet in MySQL ini file
xampp –> mysql –> my.ini
max_allowed_packet = 1M –> max_allowed_packet = 16M
Create herder & footer pages and include in Drupal 7
- You will create two files header.php and footer.php.
- Create a folder “include” in your theme directory.
- Suppose that your theme directory is “aviweb” sites/all/themes/aviweb. Put header.php and footer.php file in “sites/all/themes/aviweb/include” theme folder.
- By using html and php you can write code in header.php and footer.php.
- Now you can include both files in page.tpl.php in header area and footer area like PHP.
<?php include_once($theme_path.’/include/header.php’); ?>
<?php include_once($theme_path.’/include/footer.php’); ?>
Hot to update Drupal 7 website
- Make a backup of your Drupal instance (database).
- Set your site on maintenance mode.(Click here)
- Delete all the files & folders inside your original Drupal instance except for /sites and its sub-folders.
- Warning: If your Drupal installation is built from a distribution your site will break if you delete the /profiles folder. Don’t delete the profile folder that corresponds to the distribution you installed, for example /profiles/kickstart if you installed Drupal Commerce Kickstart.
- Copy all the folders and files except /sites from inside the extracted Drupal package [tar ball or zip package] into your original Drupal instance location.
- Some updates do not include changes to setting.php and some do. If the update release includes changes to settings.php you will need to replace your old settings.php in …/sites/default/ with the new one, and then edit the site-specific entries (eg database name, user, and password) in the setting file.
- If you have modified files such as .htaccess or robots.txt re-apply those changes to the new files.
- If you have a favicon.ico file that was deleted replace it too
- Login to your site as administrator
- Run “update.php” by navigating to http://yourdrupalsitename/update.php and follow the process to update your Drupal instance
- Disable maintenance mode.