PHP programming on Ubuntu 7.10

We can do PHP programming by any text editor, such as vi and nano. However, an Integrated Development Environment (IDE) is good for debugging.

For IDE, I choose EasyEclipse for LAMP and it is not required to install. Download it and double click it to run. However, we should install some server programs and do some configuration before using it.

Step 1
Make sure you have installed Java Runtime. Then, we should install Apache, MySQL and PHP5.

sudo apt-get install apache2 php5 php5-gd mysql-server libapache2-mod-php5 libapache2-mod-auth-mysql php5-mysql phpmyadmin mysql-admin

Then, set the MySQL root password as prompted and choose “Apache2″ as prompted.

Step 2
Go to /etc/apache2/sites-available/default change “DocumentRoot” /var/www/ to somewhere in your home directory, such as :

DocumentRoot /home/samiux/workspace/
<Directory /home/samiux/workspace/>

Step 3
Download the EasyEclipse for LAMP. Double click the “eclipse” executable file to run. Then go to :

“Window” — “Preferences” — “PHPeclipse Web Development”

to change as the following :

This opens the options dialog. First click on PHP External Tools there’s two things to change Run PHP command and Parser command:

/usr/bin/php

“Parser command” default is /apache/php/php -l -f {0}
change to:

/usr/bin/php -l -f {0}

Step 4
Click on “Apache” under “PHP External Tools” where we’ll need to change the “Apache” and “Start Apache” values:Change “Start Apache” to:

-k start

and “Apache” to:

/usr/sbin/apache2

Step 5
Then, click on “MySQL” under “PHP External Tools” where we’ll need to change the “MySQL” values:

Change “MySQL” to:

/usr/bin/mysql

Final step
Finally, restart the Apache :

sudo /etc/init.d/apache2 restart

Enjoy PHP programming on Ubuntu !!!

About these ads

3 Responses

  1. i still use notepad2 for all my php programming

    perhaps its time for an IDE

  2. […] For IDE, I choose EasyEclipse for LAMP and it is not required to install. Download it and double click it to run. However, we should install some server programs and do some configuration before using it. Read more at Samiux Blog […]

  3. […] Đăng bởi phanleson trong PHP Programming PHP programming on Ubuntu 7.10 […]

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: