How to setup a LAMP environment with xdebug under ubuntu
First of all, we need to setup the lamp (linux+apache+mysql+php) environment.
So, fire up the terminal and type:
sudo apt-get update sudo apt-get upgrade
If you don’t know which version of Ubuntu you are running, just type:
cat /etc/issue
If you are using ubuntu 6.06 you just need to run.
sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server
If you are under anything more recent that 6.06
sudo tasksel install lamp-server
After this we need to install xdebug.
sudo apt-get install php5-xdebug
To activate and configure xdebug, we need to edit php.ini
nano /etc/php5/apache2/php.ini
In the end of the file, just add
xdebug.remote_enable=On xdebug.remote_host="localhost" xdebug.remote_port=9000 xdebug.remote_handler="dbgp"
If you are developing from another computer, we need to specify that ip address under xdebug.remote_host.
We restart the server
sudo /etc/init.d/apache2 restart
And we are done.
This entry was posted on Friday, September 19th, 2008 at 3:18 pm and is filed under Development, Tutorials, php. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.


fred November 9th, 2008 at 7:03 pm
thank you..!