INSTALLING Oracle Java JDK 7 On Ubuntu 12.04 step by step

Friday, 30. November 2012

INSTALLING JDK 7 ON UBUNTU 12.04
================================

1) Download the JDK 7 from:
http://www.oracle.com/technetwork/java/javase/downloads/jdk7u9-downloads-1859576.html

2) You will download the tar.gz file. Extract it to your preferred location then run this:

— Create a new folder:

sudo mkdir -p /usr/lib/jvm/jdk1.7.0

— Move the content of JDK to your new location

sudo mv <EXTRACTED_FOLDER>/* /usr/lib/jvm/jdk1.7.0/

— Then Run the following lines one at a time

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
 
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1 
 
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1

All done!!

Call to a member function getAllOptions Mage-Core-Model-Cache

Wednesday, 14. November 2012

I came across this error today when moving file from live server to development server using git

Fatal error: Call to a member function getAllOptions() on a non-object in /app/code/core/Mage/Core/Model/Cache.php on line 455

After some head scratching it came to the fact that the download was missing an important config file

app/etc/config.xml

Add that and WootWoot!!

Can’t log into ubuntu via graphical login screen after .profile update

Thursday, 8. November 2012

I have had a scenario today after updating the .profile file where I could not log back in to ubuntu via the normal graphical login screen.

It turn out that i left the extra double quote in the .profile file (“) which was causing the error

To correct the mistake you will have to log in via terminal by hitting Ctrl+Alt+F2

Then enter your username as well as the password and navigate to yoour .profile file to make amends.

Finally, Type: sudo reboot to reboot your machine and this time you will be able to log in normally via graphical login screen.

NOTE:
Same scenario may happen if you edit .bashrc file as well.

Crtl + ALT + F2

reset XAMPP MySQL root password via PHPMYADMIN

Thursday, 8. November 2012

A little snippet for resetting a mysql root password via phpmyadmin

UPDATE mysql.USER SET Password=PASSWORD('password') WHERE USER='root';
FLUSH PRIVILEGES;

git: pull is not a git-command. See git –help

Wednesday, 7. November 2012

I have come across this error on my server

git: 'pull' is not a git-command. See 'git --help'
 
Did you mean this?
        shell

After some time of debugging, I came to realize the problem is actually due to missing files in git core folder for this current account

To solve this.. Run the following command on the terminal

git --exec-path

Make sure the path displayed exists on your current user account. If not, then copy the files from the account with Git installation that works perfectly to this user account. You will need to create that directory structure of course!

Enjoy!

WGET Save As A different file name

Monday, 5. November 2012

If you ever wanted to save the content of WGET command to a different location and a different file name this little snippet may be just the stuff you want!

wget -O /home/newfile.tar.gz http://domain.come/filename.tar.gz

Enjoy!

Magento 404 Error CMS Page Not Found In Admin Panel

Thursday, 1. November 2012

If you have been getting a 404 error when trying to access CMS pages in magento admin, possibly after an upgrade, chances are you have store IDs mixed up!

Run this script in phpmyadmin against the site database and hopefully it will bring smile to your face!

DELETE FROM cms_page_store WHERE store_id NOT IN (SELECT store_id FROM core_store);