I suppose you have installed Apache2 and PHP5 packages through zypper or yast. If not, please run:
zypper install php5 apache2 apache2-mod_php5
The reason I use xdebug is, as far as I know now, xdebug supports php 5.3 or above. I have the following installation environment:
OS: OpenSUSE 11.3 32 bit
Webserver: Apache 2.2.15 linux/suse
PHP: 5.3.2, with xdebug 2.1.0
Now let's begin (I run the following step as root, although you may not need it for some steps).
Step 1. Download xdebug 2.1.0 from http://www.xdebug.org/files/xdebug-2.1.0.tgz into /tmp directory, run tar command to unzip it, and cd into the xdebug2.1.0 directory:
cd /tmp
tar zxvf xdebug-2.1.0.tgz && cd xdebug-2.1.0
zypper install gcc make php5-devel
ls -l /usr/bin/php*
Step 5. Run the phpize command:
phpize
You should see the following message on your screen:Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
./configure --enable-xdebug && make
If everything is ok, you should see that output on the screen, like:libraries have been installed in: /tmp/xdebug-2.1.0/modules
build complete
cp modules/xdebug.so /usr/lib/php5/extensions/
Step 8. Find where the php.ini configuration file is. Again if you install php5 and apache2 through yast or zypper, it is under the /etc/php5/apache2/ directory. vi /etc/php5/apache2/php.ini
Add the following line at the end of this configration file:zend_extension="/usr/lib/php5/extension/xdebug.so"Step 9. Restart apache server, if there are no error messages, everything should work now.
/etc/init.d/apache2 restart
Step 10. Write a php page with a single line phpinfo();, load it in a browser, and you should see the following message: This program make use of the zend scripting language engine:
Zend engine v2.3.0 copyright (c) 1998-2010 zend technologies
with Xdebug v2.1.0. Copyright(c) 2002-2010, by Derick Rethans
You should also find an xdebug section near the end of this page. Bingo!Zend engine v2.3.0 copyright (c) 1998-2010 zend technologies
with Xdebug v2.1.0. Copyright(c) 2002-2010, by Derick Rethans
Please let me know if you have any question. Thanks.
0 comments:
Post a Comment