Running Zend Server on Mac OS X

Zend Technologies recently released a community edition of Zend Server, which provides a full stack of technologies that allows developers to have a LAMP installation ready in a matter of minutes. This is especially significant for developers working on Mac OS X, where Apache and PHP have historically been difficult to install despite the options of MAMP and MacPorts.

Install
The Zend Server CE edition can be downloaded for free from Zend’s website. The Mac OS X installer is around 156MB which includes Apache, MySQL, PHP and a series of tools to manage the installation. The installation went smoothly, placing all the files in the default location (/usr/local/zend).

Once the installation is complete, you are instructed to open an admin interface at http://localhost:10081/ (I had trouble opening the suggested https version). Once loaded, you are asked to set a password.

Interface
The interface is nicely done and features a monitor page (with dashboard, PHP and server info pages, and a log viewer), and a server setup page where you can enable PHP extensions, and Zend Server modules (Debugger, Optimizer and Data Cache come enabled by default).

dashboard

There is a desktop tool to manage Zend Server called ZendController. I had to look for it since the information in the documentation is not correct. I found it in /usr/local/zend/ZendController.app/Contents/MacOS/ZendController

controller

MySQL
MySQL installation is up to date and is located in /usr/local/zend/mysql

You can manage it with the included phpMyAdmin which is accessible at http://localhost:10081/phpmyadmin

Symfony
My next step was to setup Apache to play nice with Symfony. Having symfony already installed, I simply added a server-wide configuration alias so CSS and javascript files are accessible:

 Alias /sf /usr/local/php/symfony12/data/web/


Configuring Virtual Hosts

I then added a few virtual hosts and found myself with a series of forbidden access problems. After trial and error and searching over the web, I found that Apache denies all access outside the default DocumentRoot. This is an easy fix, I located this configuration section for Directory / in httpd.conf and corrected the necessary lines:

Options +FollowSymLinks
AllowOverride All
Order deny,allow
Allow from 127.0.0.1
#    Deny from all

After saving, I restarted Apache with:

sudo /usr/local/zend/bin/apachectl restart

Conclusion
In summary, Zend Server CE for Mac OS X developers is a must have. All software (including a copy of Zend Framework) is up to date, no need to compile PHP for most uses, so you are up and running in no time and ready to code right away.

10

06 2009
  • ice_j7

    Nice!, I have to give it a try even if I don’t have a Mac.

  • ice_j7

    Nice!, I have to give it a try even if I don’t have a Mac.

  • denderello

    first of all thanks for the great article! I will definitely give it a try on my macbook. Have you experienced any errors after you updated your MacOS? I know that there some issues when using things like MAMP after your systems MacOs was updated.

  • denderello

    first of all thanks for the great article! I will definitely give it a try on my macbook. Have you experienced any errors after you updated your MacOS? I know that there some issues when using things like MAMP after your systems MacOs was updated.

  • http://www.cloudheads.net/ Wil Sinclair

    Do you run Zend Server on your servers?

    BTW, Hi!
    ,Wil

  • http://www.cloudheads.net Wil Sinclair

    Do you run Zend Server on your servers?

    BTW, Hi!
    ,Wil

  • http://www.servergrove.com/ Pablo

    We are in our final stages of testing so we can provide a VPS image with Zend Server CE. We will make an announcement soon. Thanks for asking.

  • http://www.servergrove.com Pablo

    We are in our final stages of testing so we can provide a VPS image with Zend Server CE. We will make an announcement soon. Thanks for asking.

  • Darren

    Is there something you did to get mysql to work with port 3306 on 10.6? I have spent the last two days trying to get it to connect to localhost on the default 3306. I can get the lighttpd phpmyadmin to work with it.

    Btw, I just moved from debian/centos and thought that this would be the easiest setup, but this one thing is stumping me.

  • Anonymous

    Check that the sock file that php used exists or you may create a symlink. In
    my system I had to create one.

  • http://security-wire.com/10/how-to-remove-antivirus-action-rogue-anti-spyware.html remove antivirus action virus

    You do a good job, dude:)

  • http://www.resumewritingservice.biz/ first resume

    Do you mean you’ve got OSX installed on a PC? How is that possible?