Install ‘xdebug’ PHP extension for XAMPP on linux
In my previous post I wrote about how we install XAMMP in the home directory of a user. We often need to profile our code and often on a variety of setups, the answer of course is to use Xdebug.
Following is the procedure for installing PHP's 'xdebug' extension for XAMPP on linux (most of the installation procedure is same as http://www.xdebug.com/docs/install but there are a few quirks).
- First you have to install XAMPP development package (http://www.apachefriends.org/en/xampp-linux.html) for your XAMPP installation. This package provides the necessary source files needed to compile the extra stuff
- Download 'xdebug' source from http://www.xdebug.com/ , uncompress it in a suitable directory, cd to that directory.
- Now run phpize
CODE:
-
[amit@amit xdebug-2.0.0RC4]$ /opt/lampp/bin/phpize
-
- Configure the extension
CODE:
-
[amit@amit xdebug-2.0.0RC4]$ ./configure --enable-xdebug --with-php-config=/opt/lampp/bin/php-config
-
- Run 'make' to get the compiled xdebug.so
CODE:
-
[amit@amit xdebug-2.0.0RC4]$ make
-
- Copy the xdebug.so file to PHP's extensions directory (you may need root privileges for this)
CODE:
-
[root@amit xdebug-2.0.0RC4]# cp modules/xdebug.so /opt/lampp/lib/php/extensions
-
- After that edit php.ini file and add
CODE:
-
zend_extension=/opt/lampp/lib/php/extensions/xdebug.so
-
- Lastly restart XAMPP and check phpinfo for Xdebug extension
I can't think of what can possibly go wrong with the above setup instructions but if it does, put in a comment and I can try to help
About this entry
You’re currently reading “ Install ‘xdebug’ PHP extension for XAMPP on linux ,” an entry on SANIsoft – PHP for E Biz
- Published:
- 6.23.07 / 11:38am
- Author:
- Amit Badkas
16 Comments
Jump to comment form | comments rss | trackback uri