Posts mit dem Label Zend Debugger werden angezeigt. Alle Posts anzeigen
Posts mit dem Label Zend Debugger werden angezeigt. Alle Posts anzeigen

Mittwoch, 23. April 2014

HowTo install ZendDebugger for PHP 5.4 or PHP 5.5 on Debian

Since the ZendDebugger is bundled with ZendStudio and ZendServer the PHP module cannot easily be downloaded standalone.

But with some simple steps the module can be extracted out of the official ZendStudio tarball which can be downloaded for free on http://www.zend.com/en/products/studio/downloads.

Prerequisites


Make sure, openssl0.9.8 is installed. Newer Versions like openssl1.0.0+ will not work.

on debian squeeze

$ sudo apt-get install libssl0.9.8

on debian wheezy

$ wget http://snapshot.debian.org/archive/debian/20110406T213352Z/pool/main/o/openssl098/libssl0.9.8_0.9.8o-7_amd64.deb
$ sudo dpkg -i libssl0.9.8_0.9.8o-7_amd64.deb

Extract the extension


Create a temporary working dir

$ mkdir /tmp/zend_debugger
$ cd /tmp/zend_debugger

Download Zend Studio 10.6

$ wget http://downloads.zend.com/studio-eclipse/10.6.0/ZendStudio-10.6.0-linux.gtk.x86_64.tar.gz

Find the extension in the archive

$ tar -tvf ZendStudio-10.6.0-linux.gtk.x86_64.tar.gz | grep ZendDebugger.so
This will give you the following output:
-rwxrwxr-x vagrant/nogroup   238153 2014-01-08 16:11 ZendStudio/plugins/com.zend.php.debug.debugger.linux.x86_64_10.6.0.v20140128-2127/resources/php53/ZendDebugger.so
-rwxrwxr-x vagrant/nogroup   238217 2014-01-08 15:56 ZendStudio/plugins/com.zend.php.debug.debugger.linux.x86_64_10.6.0.v20140128-2127/resources/php54/ZendDebugger.so
-rw-r--r-- vagrant/nogroup   238631 2014-01-08 15:22 ZendStudio/plugins/com.zend.php.debug.debugger.linux.x86_64_10.6.0.v20140128-2127/resources/php55/ZendDebugger.so

Extract the extension for PHP 5.3, 5.4 and 5.5

$ tar -xzvf ZendStudio-10.6.0-linux.gtk.x86_64.tar.gz --strip-components 4 --wildcards *ZendDebugger.so

Install the extension


Now copy the extension matching your PHP Version to the local extension dir

For PHP 5.5

$ sudo cp php55/ZendDebugger.so `php -i | grep extension_dir | awk '{print $NF}'`

For PHP 5.4

sudo cp php54/ZendDebugger.so `php -i | grep extension_dir | awk '{print $NF}'`

Update your php.ini

Add the following lines at the end of your php.ini file
[Zend Debugger]
zend_extension=ZendDebugger.so
zend_debugger.allow_hosts=127.0.0.1/24,192.0.0.1/32
zend_debugger.expose_remotely=allowed_hosts

Check the extension

$ php -v
PHP 5.5.11-1~dotdeb.1 (cli) (built: Apr  4 2014 02:15:16)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
    with Zend Debugger v6.0.0, Copyright (c) 1999-2013, by Zend Technologies

That's it. If you can find the line "Zend Debugger v6.0.0" in the output the debugger extension is successfully installed.

Samstag, 1. Mai 2010

HowTo install ZendDebugger for PHP 5.3.1 and 5.3.2 on Linux

This article is deprecated. Please refer to HowTo install ZendDebugger for PHP 5.4 or PHP 5.5 on Debian


If you try to download a current build of the ZendDebugger from Zend.com you probably get the following error:
Zend Debugger requires Zend Engine API version 220060519.The Zend
Engine API version 220090626 which is installed, is newer.Contact
Zend Technologies at http://www.zend.com/ for a  later version of Zend Debugger.
This happens because there is no Build for PHP 5.3.2 or 5.3.1 available.
But if you take a look at the Zend Server release notes you will see, that Zend Server is shipped with PHP 5.3.2 and an enabled debugging runtime environment.

So if you use debian or ubuntu you can simply add the Zend-Server deb repository to your apt/sources.lit

  1. copy the following line into /etc/apt/sources.list
    deb http://repos.zend.com/zend-server/deb server non-free
  2. update your local package list:
    $: sudo aptitude update 
  3. install the debugger
    $: sudo aptitude install php-5.3-debugger-zend-server 
  4. The ZendDebugger is now located under /usr/local/zend/lib/debugger/php-5.3.x/ZendDebugger.so
  5. Now create a new ini file under /etc/php5/conf.d/ and add the following lines:
    zend_extension=/usr/lib/php5/20060613/ZendDebugger.so
    zend_debugger.allow_hosts=127.0.0.1
    zend_debugger.expose_remotely=always
  6. call the following command in your console to see if everything works:
    $: php -i | grep "Zend Debug"
    
    Output: "with Zend Debugger v5.3, Copyright (c) 1999-2010, by Zend Technologies"