
This article is a walkthrough on installing PHP environment – PHP, Apache, MySQL and xDebug on Debian.
When it comes to database servers, there are several free database server applications available. The intended use of the database server will have some impact on which database package you choose. MySQL is the most widely used free database server. However, it’s use is primarily to act as a back end database for Web site applications written in embedded scripting languages like PHP because it doesn’t support things like triggers, stored procedures, and replication (yet).
Open a terminal. You will need to install all the parts as root, so… suit up!
Install Apache web server
apt-get install apache2
Install MySQL server
apt-get install mysql-server
Install PHP 5
apt-get install php5
Install MySQL extension for PHP
apt-get install php5-mysql
Install xDebug extension for PHP – the extension for debugging.
apt-get install php5-xdebug
This all what you have to install. Now we will set up Apache and PHP.
After installing Apache the server should be running. If you click this link http://localhost/ the Firefox is opened and you should see a page with the text “it works!”.
Enable remote debugging in xDebug
In the folder /var/www/ create an info.php file with content with the property tags:
phpinfo();
Hit http://localhost/info.php and you should see how the PHP runtime is setup. Search for the property xdebug.remote_enable property. By default this property is switched off.
To enable this property you have to open file /etc/php5/conf.d/xdebug.ini and add this line:
xdebug.remote_enable=on
and restart the Apache web server
/etc/init.d/apache2 restart
Posted by Firefox » Debian - PHP, MySQL, Apache2 on February 21, 2009 at 6:28 pm
[...] DaniWeb IT Discussion Community – Software Programming / Web Development and Technical Support wrote an interesting post today on Debian – PHP, MySQL, Apache2Here’s a quick excerptIf you click this link http://localhost/ the Firefox is opened and you should see a page with the text “it works!”. [...]