Setup Eclipse DebuggerKnow where the php.ini and PHP extensions directory is. (/etc/php5/apache2/php.ini)
Make a simple phpinfo.php where it only contains <?php phpinfo(); ?> you can also get php info by installing the package php5-cli in linux
Run the server and check the content of that page you made - it will include all info about your local PHP
OR
$ php -i | grep "Loaded Conf" Download eclipse PDT Download Zend Debugger Either from http://downloads.zend.com/pdt/server-debugger/ OR http://www.zend.com/en/products/studio/downloads -- Studio Web Debugger -- for windows OR Zend Community Edition (we only need the ZendDebugger.so from the whole package!) Move ZendDebugger.so (or ZendDebugger.dll) to extension_dir of the php core configurations mentioned in the phpinfo.php you made. /usr/lib/php5/20060613+lfs OR c:/wamp/bin/php/php5.3.4/ext/ OR $ php -i | grep "exten" Modify php.ini (found at Configuration File (php.ini) Path mentioned in the phpinfo.php you made.) as following: [Zend] zend_extension="/full/path/to/ZendDebugger.so" zend_debugger.allow_hosts="127.0.0.1, 10.0.1.3" zend_debugger.expose_remotely=always Check if the module installed correctly refresh the phpinfo.php you made and see if the result includes Zend Debugger or by $ php --php-ini /etc/php5/apache2/php.ini -m [Zend Modules] Zend Debugger put
your projects at the home directory of the web server, give eclipse the
path of the particular file you are executing on the server, and debug! XdebugTo use Xdebug in linux you have to get the source code of Xdebug To compile Xdebug we need php5-dev $ sudo apt-get install php5-dev Perform the steps at the README file in the unzipped Xdebug source code directory to compile it $ cd xdebug_source_code_dir $ phpize $ ./configure --enable-xdebug $ make $ make test $ cp xdebug.so /usr/lib/php5/20060613+lfs (the extension_dir of PHP, obtained through the php functioncall of phpinfo();) add the following to your php.ini (mine was in /etc/php5/apache2) zend_extension="/usr/lib/php5/20060613+lfs/xdebug.so" xdebug.remote_enable=On xdebug.remote_host="localhost" xdebug.remote_port=9000 xdebug.remote_handler="dbgp"
|