wordpress blog stats

Are you facing the following error in Linux /Ubuntu:

FATAL ERROR: register_globals is disabled in php.ini, please enable it

If this is the case then here is a problem solution:

Solution – register_globals is disabled in php.ini

While installing zencart in Ubuntu, I got the error of register_globals is disabled in php.ini, so here is a simple solution:

  • Open up the Terminal: Applications -> Accessories -> Terminal
  • Now open the file php.ini in any editor, existing in your php’s apache folder, in my case its php5:
    sudo gedit /etc/php5/apache2/php.ini
    or
    gedit /etc/php5/apache2/php.ini
  • Find the text in the php.ini file as register_globals, where you will find the text as:
    register_globals = Off
    and change this line to
    register_globals = On

Now save and close the file, and restart apache server. In my case, it is:

sudo /etc/init.d/apache2 restart

All done.

Now you will be able to get rid of this error and enjoy coding.

If you have any suggestion, or can advise something better than the solution above, please share.

PHP Error Reporting Code

To display PHP error reporting within the code, following post may be helpful.

Enable PHP Display Error

To enable errors, usually errors and warnings, simply add following lines of code in your file, within PHP tags:

error_reporting(E_ALL ^ E_NOTICE);
ini_set('display_errors','On');

Please note that the above code displays errors and warnings, and not the notices.

To display all the errors in the file, remove the E_NOTICE as below:

error_reporting(E_ALL);
ini_set('display_errors','On');

If you are still unable to see the PHP errors, following post may be helpful:

PHP Errors Display ON and OFF for Windows and Linux (Ubuntu)

The Symbol ‘grub_xputs’ Not Found

After installation of Ubuntu’s latest release, following error starts appearing in the startup:

the symbol ‘grub_xputs’ not found

How To Resolve – The Symbol ‘grub_xputs’ Not Found

To resolve this issue, open your Ubuntu, through Live CD, and reinstall Grub2.
Check out the following post for how to install grub2:

Install Grub2 From Live CD

Ubuntu – Incompatible License

After installation of Ubuntu’s latest release, following error starts appearing in the startup:

Incompatible License

How To Resolve – Incompatible License

To resolve this issue, all you need to do is, to open your Ubuntu, through Live CD, and reinstall Grub2.
For more details on how to install Grub2 through Live CD, check out the following post:

Install Grub2 From Live CD

Are you receiving the message of Ubuntu not supported anymore.

Your Ubuntu Release Is Not supported Anymore

While using Ubuntu 10.10, following message appears while you want to update your Ubuntu 10.10 OS:

Your Ubuntu release is not supported anymore

You will not get any further security fixes or critical updates. Please Upgrade to a later version of Ubuntu Linux.

If this is the case, then it is advisable to move on to the latest version of Ubuntu, (currently 11.10 LTS), though its a great experience of using Ubuntu 10.10 for a long time period, but as it is no more supported, there might be cases where upgrades will be necessary for the software we’re using.

Long live UBUNTU!

Google Plus Facebook Like Twitter Tweet Buttons Code

Finding out some wordpress plugins of Google Plus, Facebook Like and Twitter’s Tweet buttons, some performance and other issues were faced, due to which I thought to find out direct code & scripts of all, and make them self embedded in the theme. If you looking for how to add buttons for Google Plus, Facebook Like and Twitter Tweet in a blog or website, there here are the simple >scripts / code you can add in your site:

Google Plus Button Code

Following is the script, and the div, which you can add anywhere in your code, for adding the Google Plus button in your website. Preferable is to add the script in the header tag, and then the div, where you want the Google Plus button to be shown, but you can also use the script and div together, like below:

<script type=”text/javascript” src=”https://apis.google.com/js/plusone.js”></script>
<div class=”g-plusone”></div>

 

Twitter Tweet Button Code

Following is the script, which you can add anywhere in your code, for adding the Twitter Tweet button in your website:

<a href=”https://twitter.com/share” class=”twitter-share-button”>Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=”//platform.twitter.com/widgets.js”;fjs.parentNode.insertBefore(js,fjs);}}(document,”script”,”twitter-wjs”);</script>

 

Facebook Like Button Code

Following is the script, which you can add anywhere in your code, for adding the Facebook Like button in your website:

<script src=”http://connect.facebook.net/en_US/all.js#xfbml=1″></script>
<script type=”text/javascript”>
document.write(‘<fb:like layout=”button_count” show_faces=”false” width=”100″></fb:like>’);
</script>

 

If you have any other easy solution for any of all of these mentioned above, please share or comment.

Uninstall / Remove Applications Ubuntu

Are you looking for how to uninstall or remove applications and programs from Ubuntu / Linux. Here is a simple solution:

Uninstall Ubuntu Programs

To Uninstall or Remove programs from Ubuntu in not a big science. All you need to do is to open up Synaptic Package Manager through:

System -> Administration -> Synaptic Package Manager

and choose the programs listed in Synaptic Package Manager. Right click on the chosen program, and choose Mark For Removal or Mark For Complete Removal, whatever suits your needs and follow the procedure.

Uninstall / Remove Applications Through Terminal

If you dont want Synaptic Package Manager to remove and uninstall your applications, you can, as an alternative, remove your desired applications in Ubuntu through command line Terminal. To do that, all you need to know is the exact application name, which you want to be uninstalled. If you know the application name, then here is an easy procedure you can follow, to remove applications in Ubuntu through command line Terminal:

Open up the Terminal: Applications -> Accessories -> Terminal

and write the following command, removing the application-name with the application name you want to uninstall:

sudo apt-get remove application-name

For example, if you want to uninstall Apache2 in Ubuntu, enter the following command:
sudo apt-get remove apache2

Hope this works for you.

If you have any other alternative or easy method in removing programs in Ubuntu, please share with us.

MySql Date Add Subtract

To add or subtract dates through MySql, here are both of the examples, where you will find how to add and how to subtract a date, from a given date, in MySql:

MySql Add Date

To add MySql date through a query, like if you want to get a date, for example:

MySql Add Day

If you want to find out what date will it be after two days, write the following query:
SELECT DATE_ADD(NOW(), INTERVAL 2 DAY)

MySql Add Month

If you want to find out what date will it be after one month, write the following query:
SELECT DATE_ADD(NOW(), INTERVAL 1 MONTH)

MySql Add Year

Or if you want to find out what date will it be after one year, write the following query:
SELECT DATE_ADD(NOW(), INTERVAL 1 YEAR)

MySql Subtract Date

To subtract MySql date through a query, like if you want to get a date, for example:

MySql Subtract Day

If you want to find out what date will it be after two days, write the following query:
SELECT DATE_SUB(NOW(), INTERVAL 2 DAY)

MySql Subtract Month

If you want to find out what date will it be after one month, write the following query:
SELECT DATE_SUB(NOW(), INTERVAL 1 MONTH)

MySql Subtract Year

Or if you want to find out what date will it be after one year, write the following query:
SELECT DATE_SUB(NOW(), INTERVAL 1 YEAR)

Also note that, if you want to get only date, and not the hours, minutes and seconds, then simple add the DATE() function at the start of the query, like:

SELECT DATE(DATE_SUB(NOW(), INTERVAL 2 DAY))

Launch Of Notepad Plus Plus 6

We are excited to announce that, long awaited Notepad++ 6 has been launched, with some of the new features. Long awaited, one of the favorite and light weight Editors, Notepad++ has launched its latest release of Notepad++ 6.

Notepad++ 6 Features

Though there are not so many features yet announced in this newer version, but here they are:

  • Support of PCRE (Peal Compatible Regular Expression)
  • A good feature of Document Map, to help programmers get into the middle, start or end of the code, where they want, through this new map feature
  • Enhancement of loading performance for larger files

Download Notepad++

So what are you waiting for. Click on the following link, and get the latest Noteapad++ downloaded:
Download Notepad++

Android – Insufficient Permissions For Device

While mounting the Android device through SDK for adb shell, following error occured:

insufficient permissions for device

Solution For Insufficient Permissions For Device

To make this issue resolved, lets try running the following commands in the Terminal:

sudo adb kill-server

After running this command, now run:

sudo adb devices

If you are able to see the List of devices attached with some long numbers, instead of questions marks ???, then your problem could have been resolved.

Now you can use the adb shell, or whatever the functions you were performing, for which you were having the insufficient permissions for device error.

Hope this will work.

If you have any other solution, then please share with us through our Contact Us Form or comments box.