1

Zend Server Community Edition on Ubuntu

Posted July 16th, 2010 in Php, Ubuntu and tagged , , , , by Florentin

What is Zend Server CE (Community Edition)

You can think of Zend Server as a bundle of software and Php modules.
For Linux, ZSCE has it’s own php-*-zend-server packages which replace the ones offered by the host Os, usually php5-*
ZSCE automatically installs lighttpd-zend-server used for the web-based administration.

Why to use Zend Server CE

  • Easy to start with specially useful for Php newcomers
  • Production-ready, integrated PHP stack for non-critical applications
  • PHP bytecode caching (Zend Optimizer+) – increases performance with no application changes
  • Data caching – a set of functions that allow developers to cache data in shared memory or to disk )
  • Zend Debugger available out of the box but possible to disable it and install Xdebug
  • Available on Windows, Linux and Mac
  • All in one install taking care of all the dependencies and needed libraries
  • Integrated administration console for setting up Apache and Php configurations
  • Free (the CE version) and supported by Zend which takes care of bug fixes and future improvements
  • Easy way to install Php 5.2 on Ubuntu Lucid or other distros which offer Php 5.3 by default
  • Easy to uninstall with no traces left on the system
  • Ability to install both Php 5.2 and Php 5.3 on the same system as described here http://ireallylikesushi.com/blog/2009/12/21/installing-both-zend-server-ce-php-5-2-php-5-3-on-snow-leopard/

Sources

http://www.zend.com/en/products/server-ce/

http://devzone.zend.com/article/4295

Installation (Ubuntu Lucid 10.04)

echo deb http://repos.zend.com/zend-server/deb server non-free > /etc/apt/sources.list.d/zend.list
wget http://repos.zend.com/deb/zend.key -O- | sudo apt-key add -
apt-get update
apt-get install zend-server-ce-php-5.2 # for Php 5.2
apt-get install zend-server-ce-php-5.3 # for Php 5.3

Please find the official installation details here:

http://files-source.zend.com/help/Zend-Server-Community-Edition/zend-server-community-edition.htm#deb_installation.htm

Installing Xdebug on Zend Server (an alternative to Zend Debug)

Option 1 (recommended)
# get archive, configure and compile it. First check the latest version on xdebug.org
wget http://www.xdebug.org/files/xdebug-2.1.0.tgz # replace it with the latest version
tar -xzf xdebug-2.1.0.tgz
cd xdebug-2.1.0/
/usr/local/zend/bin/phpize
./configure --enable-xdebug --with-php-config=/usr/local/zend/bin/php-config
make


# move the xdebug.so somewhere on the server
cp modules/xdebug.so /work/xdebug/xdebug.so
# edit zend-server's php.ini to enable xdebug
sudo gedit /usr/local/zend/etc/php.ini
# add to the end of the file
zend_extension=/work/xdebug/xdebug.so


# optionally, add some xdebug directives to that php.ini
[xdebug]
xdebug.profiler_output_dir = /tmp
xdebug.profiler_enable_trigger = 1
xdebug.remote_enable=1
xdebug.remote_host=localhost

xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.var_display_max_data=10000
xdebug.var_display_max_depth=20

Option 2

ZSCE comes with a package named php-5.2-xdebug-zend-server. At this moment, the Xdebug version offered by ZSCE is older (2.0.4) than the official one (2.1.0)

# install xdebug.so in /usr/local/zend/lib/php_extensions/
apt-get install php-5.2-xdebug-zend-server
# Add the following line to /usr/local/zend/etc/php.ini
zend_extension=/usr/local/zend/lib/php_extensions/xdebug.so
# You may also add the xdebug directives described in Option 1.

Controlling Zend Server

# show all commands
sudo /usr/local/zend/bin/zendctl.sh -h

# restart zend server, including apache server and lighttpd server
sudo /usr/local/zend/bin/zendctl.sh restart

The end

# My bookmarks regarding Zend Server

http://delicious.com/florentin/zend-server

# Other bookmarks

http://delicious.com/search?p=zend%20server&u=&chk=&context=main&fr=del_icio_us&lc=0

One Response so far.

  1. sylvain says:

    I try this tutorial for working with symfony and Zend Server CE and there is a bug with

    xdebug.show_local_vars=On

    I recommend to comment this line or to simply delete it

Leave a Reply