Skip to content

Instantly share code, notes, and snippets.

@hertsch
Last active December 22, 2015 03:09
Show Gist options
  • Save hertsch/6408272 to your computer and use it in GitHub Desktop.
Save hertsch/6408272 to your computer and use it in GitHub Desktop.
Using ZendServer (Windows) and ZendStudio for projects with WebsiteBaker, LEPTON and kitFramework / Silex / Symfony

Install and configure Zend Server

The Zend Server need some extra settings to be used with WebsiteBaker, LEPTON and the kitFramework (Silex/Symfony), this is a brief summary of the configuring steps.

  • download and install Zend Server in Custom mode
  • select MySQL (separate download) in the components to install
  • execute setup
  • change license to Free Edition
  • at top right within the ZendServer search function type in phpMyAdmin,
  • follow the proposed steps in the help page and install phpMyAdmin

Change the document root

To change the document root from default

C:\Program Files (x86)\Zend\Apache2\htdocs

to another directory, i.e. D:\htdocs open the Apache configuration

C:\Program Files (x86)\Zend\Apache2\conf\httpd.conf

with an editor in Windows Administrator mode.

Change the line

DocumentRoot "C:\Program Files (x86)\Zend\Apache2/htdocs"

to

DocumentRoot "D:\htdocs"

and the line

<Directory "C:\Program Files (x86)\Zend\Apache2/htdocs">

to

<Directory "D:\htdocs">

save the file, switch to ZendServer Administration Interface and restart the Server.

Don't forget to copy/move the dummy.php from the origin \htdocs to the new one, this file is needed by the Zend Debugger!

Switching off MySQL strict mode

If you try to install WebsiteBaker you will get the error

Field 'value' doesn't have a default value

If you try to install LEPTON you will get the error

By security reasons it is not permitted to load 'config.php' twice!! Forbidden call from ...

This problem is caused by the MySQL strict mode, which is default at ZendServer.

With an editor in Windows Administrator mode open the MySQL configuration:

C:\Program Files (x86)\Zend\MySQL55\my.ini

and change the line

sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

to

sql-mode=""

save the file and restart the MySQL_ZendServer using the Windows Service Control Manager.

Enable routing for Silex/Symfony

To enable the routing without specifying an extension MultiViews and AllowOverwrite must be enabled for the DocumentRoot directory.

With an editor in Windows Administrator mode open the Apache configuration file

C:\Program Files (x86)\Zend\Apache2\conf\httpd.conf

and change

<Directory "D:\htdocs">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

to

<Directory "D:\htdocs">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

File and directory permissions

The Zend Server is configured very restrictive, which is absolutely correct for productive environments. For developing we often want it less restrictive.

Change the http.conf from

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

to

<Directory />
    Options FollowSymLinks
    AllowOverride All
    Order deny,allow
    Allow from all
</Directory>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment