Monthly Archives: December 2013

How to start XAMPP in Terminal Mac OSX

In the latest version of XAMPP, they removed the GUI to start stop Apache as well as other services (MYSQL,FTP etc). You have to use command line on terminal to start stop Apache Server. Documentation can be found on XAMPP site it self, However they do not show the exact command to stop stop. Here is quick tutorial how to start stop XAMPP

  1. Start Terminal. Issue this command to go where XAMPP is installed
  2. Issue the following command.  You have to use SUDO because this command needs root level privilege. Note that ./ is important. It indicates xampp is in the current folder

Or you can do it in one step by issuing the following command

Fixing Security Issues (login)

When you access localhost it might prompt you for user name and and password. The default username is “xampp”, the password is the one that you already set. If you have issue accessing the site, you simply need to reset username and password. Run the following command to do that. This will fix issues with the login

Start XAMPP using GUI

Click here to Start XAMPP using GUI on Mac

Using Path

In the comments of “How to start XAMPP in Terminal Mac OSX”, there were suggestions about using alias for the command. The problem with alias is they are temporary and are lost as soon as you close the Terminal Window. You have to recreated them each time you open the terminal.

A better approach is to add xampp to system path so you do not have to type complete path each time you run this command. You can follow this easy tutorial how to modify path variable on mac. In short, issue this command

1. Enter your user name and password (it will prompt for it)
2. Edit the file, add the path, /Applications/XAMPP/xamppfiles, at the bottom of the file in a new line
3. Hit Command + O to write the file
4. Close the terminal completely and re-open it again.

Now you can use use xamppt start command directly in the terminal

Contact Hammad

Hammad Khan is an experienced software engineer with 10+ years of experience in desktop application, web application, databases and websites. You may contact him for technical expertise or hire him for your project on contract or perm basis.

Your Email:
Your Message:

How to setup Assembla Repository Git

Setting up Git Assembla Repository can be a challenge because of the security features in Git. Here are the steps that you need to follow to create an Assembla Repository and checkout (and commit) your changes.

1. Create Assembla Account

Make it Git Repository. It will give you a URL where you can post your code from your local computer.

2. Create SSH key

Git works on SSH key. Your Assembla needs to know about the SSH key(s) that you will generate on your computer. There are two type of SSH keys generated. Private and Public. Private key has no file extension. Public key has .pub extension. SSH Key also needs phrases. You will need the private key and this phrase to connect to Assembla.

Issue this command to generate SHH key on mac

ssh-keygen -t rsa -C ""

//outputGenerating public/private rsa key pair.
Enter file in which to save the key (/Users/work/.ssh/id_rsa): my_ssh_key
Enter passphrase (empty for no passphrase): 

//This will generate fingerprints in the output as well but the actual keys are in the file.
// my_ssh_key    contains identification needed by Assembla
// my_ssh_key.pub contains public key. This needs to be uploaded to Assembly (My profile> MY SSH Keys)
// phrase      The phrase that you typed in will also be required by Assembla when you connect to your remote repository

3. Download SmartGit (Git Client)

SmartGit will use the setting that you created in step two. Create an empty folder where all your repositories will be hosted such as /Repositories/. Create subfolder for the project where that particular project will be sitting. Example

/Repositories/
    /Project1
    /Project2

During the setting SmartGit will require

* The url of your repository (found project/Git tab on top)
* my_ssh_key, point SSH key to this file
* Phase, Type the phrase that you entered when generating SSH

If you have done all the steps, you should be all set. This was a quick tutorial of How to setup Assembla Repository Git.

JavaScript is not called

JavaScript is not called or JavaScript on the page is not shown in F12 debugger. The cause could be as in my case, there is an error in JavaScript. The following JavaScript is not shown in F12 debugger if I remove the commented Script.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="jquery/jquery.colorbox.js"></script>
<script type="text/javascript">
alert("I am called");
        /*
          $(document).ready(function(){
        //Examples of how to assign the Colorbox event to elements
        $(".color1").colorbox({rel:'color1'});
        }
        */

Thee problem here is , } should be });

$(document).ready(function(){
        //Examples of how to assign the Colorbox event to elements
        $(".color1").colorbox({rel:'color1'});
        });