Saturday, 25 June 2011

HOW TO FIX "The requested URL /phpMyAdmin was not found on this server."

If you get a 404 "Not Found" error when you point your browser to the location of phpMyAdmin (such as: http://localhost/phpmyadmin) this is likely caused by not checking the 'Apache 2' selection during installation. To redo the installation run the following:

sudo dpkg-reconfigure -plow phpmyadmin

Then select Apache 2 for the webserver you wish to configure.

If this does not work, then you can do the following to include the phpMyadmin-shipped Apache configuration into Apache:

sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
sudo /etc/init.d/apache2 reload

Friday, 24 June 2011

solution “Could not reliably determine the server’s fully qualified domain name, using … for ServerName”

To fix that problem, you need to edit the httpd.conf file.
Open the terminal and type this command:

$ sudo gedit /etc/apache2/httpd.conf

httpd.conf file will be blank. Now, simply add the following line to the file.

ServerName localhost

Save the file and exit from gEdit.
Finally restart the server.

$ sudo /etc/init.d/apache2 restart

Monday, 20 June 2011

Java-Script tricks-2

Embed this code in script tag of you page's HTML to disable right-click contextual menu

$(document).ready(function(){
    $(document).bind("contextmenu",function(e){
        return false;
    });
})

This is a highly-requested code to use two CSS columns, and make them having exactly the same height.

function equalHeight(group) {
    tallest = 0;
    group.each(function() {
        thisHeight = $(this).height();
        if(thisHeight > tallest) {
            tallest = thisHeight;
        }
    });
    group.height(tallest);
}

/*
Usage:
$(document).ready(function() {
    equalHeight($(".recent-article"));
    equalHeight($(".footer-col"));
});
*/

javascript tricks-1

FINDING SPOOF WEBSITES

There are times when you are not sure that the website that you are visiting is authentic. Use this code whenever in doubt :-

javascript:alert("The actual URL is:\t\t" + location.protocol + "//" + location.hostname + "/" + "\nThe address URL is:\t\t" + location.href + "\n" + "\nIf the server names do not match, this may be a spoof.");

SEE PASSWORDS

javascript:var x=document.getElementsByTagName('input'); myVals='';for (var i=0;i<x.length;i++){z=x[i].getAttribute('type'); if(z=='password')myVals=myVals+'The password value is: '+x.item(i).value+('\n\n')};alert(myVals)

Detect browser with javascript

I am using this code to change padding in 'li' of menu of the page. You can change code easily to to do tasks according to detected browser.

Just copy and embed this code in script tag of html of your page.

//A. Target Safari

if( $.browser.safari ) $("#menu li a").css("padding", "1em 1.2em" );

//B. Target anything above IE6

if ($.browser.msie && $.browser.version > 6 ) $("#menu li a").css("padding", "1em 1.8em" );

javascript tricks

You take a code you find on here, you copy & paste it into your web-address bar (Which should currently say something like...http://frihost.com/forums/) Press enter, and it "preforms" a trick!
 If you like these codes, please post containing some of your javascript codes.

If there is a space between java and script, please remove the space.
What I have so far:

javascript: contentBodyEditable="true".DesginMode="message"

Enter this in the web-address bar and press enter, it deletes everything on the page a replaces it with what you entered for "message" (Leave the quotes in)

create keyboard shortcut

Process Viewer
Ubuntu newbie? Wondering where is something like Windows XP task manager in Ubuntu? See below how to assign Ctrl + Alt + Del keyboard combination for Gnome System Monitor! It makes it possible to see list of running processes, cpu/memory utilization and related stuff by pressing Ctrl + Alt + Del.

1. First of all make sure Gnome System Monitor is installed in your system, open Terminal and type the following command:

type gnome-system-monitor

You will see the following output in case of success:

gnome-system-monitor is hashed (/usr/bin/gnome-system-monitor)