Archive for January 2010


Apache server for linux

January 17th, 2010 — 4:32am

Adding apache server in your linux installation is easy using XAMPP. It was earlier called LAMPP and is now being called the XAMPP. The understanding is that

it stands for X (linux), A (apache), M (mysql), Php (php).

This is a nice way to develop php websites locally on your computer before wanting to deploy it online. You can even make your server visible to the internet by putting XAMPP online and open to the Internet. Doing that will allow you to run your own server. Some help from DynDNS will help you map a domain name to the ip address of your XAMPP on your computer. These will not be discussed here but lets continue towards linux installation of XAMPP.

Steps :
1) Download the XAMPP package from sourceforge.

1.1) Become the administrator using :
su
2) (Important) Extract ONLY using the following command
tar xvfz xampp-linux-1.7.3a.tar.gz -C /opt

Warning: Please use only this command to install XAMPP. DON’T use any Microsoft Windows tools to extract the archive, it won’t work.

Good News: XAMPP is now installed below the /opt/lampp directory.

3) Start the server using :
/opt/lampp/lampp start

Good News if you see :
Starting XAMPP x.x.x…
LAMPP: Starting Apache…
LAMPP: Starting MySQL…
LAMPP started.

4) Test the server by opening firefox and typing

http://localhost

Go ahead and start building your application !!

2 comments » | Tips N Tricks

Send exe files in gmail

January 9th, 2010 — 12:11am

Trying to send an exe file in Gmail throws up an error saying that your email cannot be sent with the attachment as it is a security risk to Gmail. The easy way out is to hide the extension.

Solution : 1
Rename the ABC.exe to ABC.txt . Attach the ABC.txt file in your Gmail and do the reverse at the receiving end.

Solution : 2
Use Winrar/Winzip/etc and make ABC.exe to ABC.rar/ABC.zip/etc.zip before sending.

Once you receive the file from the mail just reverse the step. Either change the extension of unzip the file.

Comment » | Tips N Tricks

Eclipse : Configure PHP (PDT), How to ? Part : 2

January 8th, 2010 — 11:59pm

[3] Installing the perspective is the step where you actually ask eclipse to install the perspectives for you. In step 2 we had just listed the urls/locations where our package would be found. To install the new perspective, get to help > Install new software.

[4] Select the url to download the software from and the package you want to install. You can notice that in the picture below, the site to “work with” is selected as “PDT” from the drop down menu. Also the packages to be installed is selected by selecting “PDT 2.0 xx xx”. Once you have finished this, select to proceed “Next”.

[5] Review the list of packages being installed . This step is followed by “Finish” that will launch your instalation into an autopilot mode until restarting the the Eclipse IDE.

6 – Eclipse installs the packages you requested

[7] Select the perspective to work with once eclipse restarts after installation. To select a particular perspective in eclipse, say php or c,c++ you will have to get to Windows > Open perspective > other.

[8] Select the perspective you want to open form the list.

When it comes to PHP development the development becomes much easier if we are able to work on the files directly on the server. Unless you are more comfortable with a vi or emacs setup working so is difficult. Eclipse can offer you a facility to work with remote systems so that eclipse takes care of the FTP/SSH to the server while you can work on the file on eclipse as if it were a local copy. We would explore this option in future tutorials.

Comment » | Programming

Eclipse : Configure PHP (PDT), How to ? Part : 1

January 8th, 2010 — 11:25pm

Eclipse is a great development environment that will help you develop projects in almost all the most common languages that you might want to use. Eclipse can be configured to be used for Java, C, C++, Python, Ruby, HTML and PHP developments. There are potentially more possible developments but the above is just a list of few of them.

It is important to understand that eclipse is not a compiler that can compile these languages for you and offer the corresponding executable or alike. But eclipse is just a development environment that will use the compilers/linkers/servers that you have already installed on your computer. In other words, you can develop the C code in eclipse, but eclipse will in turn call the C compiler that has been installed in your computer. The same hold for other languages too, e.g Python development on eclipse will need you to install the python engine on your computer. Eclipse will interpret your python code using the python interpreter that you might have already installed.

The idea of using development environment for different languages needs eclipse to be configured to handle these different languages. Each configuration is called “perspective” in the eclipse terminology. Hence you need to configure the “php perspective” to work with eclipse for php development and when you want to write your “C/C++” code you need to switch the perspective to a “C/C++” perspective.

Tutorial: Install PDT in eclipse:

Follow the steps below and continue along to part : 2 of this tutorial and get your Eclipse installation all setup for PHP files.

[1] To configure the installation URL you must first get into windows > Preferences where you can select the urls where the repositories are located. This tutorial hold good for installation of any new development toolkit to eclipse. What would vary with each installation is the package that you might select to install.

[2] Add the following two urls by clicking add and filling in the details for name and location. (This is specific to installing PHP Development Toolkit for eclipse)

Comment » | Programming

Back to top