Zend Framework


    NOTE: This guide uses /opt/bitnami to refer to the installation directory for the Bitnami Stack. This is the default installation directory for Bitnami Cloud Hosting, Google Cloud Platform and Microsoft Azure servers and for virtual servers. If you're using a native installer and have installed the Bitnami Stack to a different folder, replace /opt/bitnami in the examples below with your actual installation directory.


    The Zend Framework is installed in the frameworks/zendframework directory in the installation directory. This directory includes an example application. Application configuration files are in the config/ directory, application modules are in the module/ directory and public files, such as HTML pages, CSS and JavaScript files, images and other media assets are stored in the public/ directory.

    Activation and Testing

    To enable the example application, edit the Apache configuration file at  /opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf and uncomment the following line

    Include "/opt/bitnami/frameworks/zendframework/conf/httpd-prefix.conf"

    Then, restart the Apache server.

    $ sudo /opt/bitnami/ctlscript.sh restart apache

    You can now verify that the example application is working by visiting its URL using your browser. Select your platform below.

    Bitnami Cloud Hosting

    Access the example application via your browser at http://[server-IP-address]/zendframework

    Microsoft Azure / Google Cloud Platform

    Access the example application via your browser at http://[server-IP-address]/zendframework

    Virtual Machine

    Access the example application via your browser at http://[virtual-server-IP-address]/zendframework

    Native Installer

    Access the example application via your browser at http://localhost/zendframework (Windows) or http://localhost:8080/zendframework (Mac OS X and Linux).

    Tabs end

    Here is an example of what you might see:



    Before using the example application, here are a few important points to consider:

    1. If your application will use a database, MySQL support is already available by default. If you plan to use PostgreSQL, enable the php_pdo_pgsql extension in the /opt/bitnami/php/etc/php.ini file.


    To obtain access credentials for the MySQL database, use user 'root'. For the MySQL password, follow the steps below:

    Bitnami Cloud Hosting

    Google Cloud Platform

    • Browse to the Bitnami Launchpad for Google Cloud Platform dashboard and sign in if required using your Bitnami account.
    • Select the "Virtual Machines" menu item.
    • Select your Bitnami Stack server from the resulting list.
    • Obtain the password by selecting "Show" under "Credentials".

    Microsoft Azure

    To log in, use default password 'bitnami'.

    Virtual Machine

    To log in, use default password 'bitnami'.

    Native Installer

    The password is the one specified by you during the Bitnami Stack installation process.

    Tabs end

    2. To move the Zend Framework example application such that it is available at the root URL of the server (without the /zendframework URL suffix), follow these steps:

    • Edit the /opt/bitnami/frameworks/zendframework/conf/httpd-prefix.conf file so that it looks like this:
    DocumentRoot "/opt/bitnami/frameworks/zendframework/public"
    #Alias /zendframework/ "/opt/bitnami/frameworks/zendframework/public/"
    #Alias /zendframework "/opt/bitnami/frameworks/zendframework/public"
    Include "/opt/bitnami/frameworks/zendframework/conf/httpd-app.conf"
    • Edit /opt/bitnami/frameworks/zendframework/public/.htaccess and comment the RewriteBase line:
    # RewriteBase /zendframework
    • Edit the /opt/bitnami/frameworks/zendframework/conf/httpd-app.conf file and replace the AllowOverride None directive with the AllowOverride All directive:
    AllowOverride All
    • c. Restart the Apache server:
    $ sudo /opt/bitnami/ctlscript.sh restart apache

    You should now be able to access the example application at the root URL of your server.

    Upgrading Zend Framework 2.x

    If your Bitnami stack currently uses Zend Framework 2.x and you would like to update to the latest 2.x release, follow these steps:

    NOTE: The steps below assume that you have already activated the Zend Framework example application, as described here.
    1. Log in to your server console.
    2. If you are using a native installer only, load the Bitnami environment:
      $ cd /opt/bitnami
      $ ./use_lampstack
    3. Change to the Zend Framework directory and edit the composer.json file:
      $ cd /opt/bitnami/frameworks/zendframework
      $ sudo vi composer.json
    4. Within the composer.json file, update the version of the zendframework/zendframework package to the latest available version. Save your changes. For example:
        "require": {
          "php": ">=5.3.3",
          "zendframework/zendframework": "2.5.*"
    5. Update to the specified version of the framework by executing the following commands:
      $ cd /opt/bitnami/frameworks/zendframework
      $ sudo composer self-update
      $ sudo composer update

    You should now be able to access the example application and verify that it is using the specified version of Zend Framework 2.x, as shown below:


    More Information

    Learn more about developing applications with the Zend Framework at http://framework.zend.com/learn/.

    Tag page (Edit tags)
    • No tags
    Pages that link here
    Page statistics
    157117 view(s), 21 edit(s) and 8983 character(s)


    You must login to post a comment.