Thursday, January 10, 2008

Hiccups with PHP5 and xdebug on RHEL

Root cause of all this was that /usr/ filesystem is Read-only; so I had to compile binaries to install on writable area. So i did the following.

1. Executed the following from php source root folder; this installed the php binaries under --prefix location
./configure --prefix /scratch/asamuel/projects/opensource/php-5.2.5/install
make install

2. Executed the following from xdebug source root folder
./configure --enable-xdebug --with-php-config=../../php-5.2.5/install/bin/php-config

3. Copied /scratch/asamuel/projects/opensource/php-5.2.5/php.ini-recommended to /scratch/asamuel/projects/opensource/php-5.2.5/php.ini

4. Modified php.ini to load xdebug extension and enable remote debugging using

3. Verified the build using (where alias php5=/scratch/asamuel/projects/opensource/php-5.2.5/sapi/cli/php -c /scratch/asamuel/projects/opensource/php-5.2.5/php.ini $*)
php5 -v
which resulted
PHP 5.2.5 (cli) (built: Jan 10 2008 12:52:19)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with Xdebug v2.0.2, Copyright (c) 2002-2007, by Derick Rethans

No comments:

I am well fed with these !!