Skip to content
An example project how to use bootstrap-zf, twitter-bootstrap, composite-eventbus, PHP addendum and jQuery. This example shows how to implement AJAX requests, validation, Unit testing and other features.
PHP JavaScript Shell
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Zend Framework with bootstrap-zf

Installation on Ubuntu

Apache 2.2 and MySQL should be already installed. Ensure, you use NameVirtualHost inside /etc/apache2/httpd.conf - if not, add it: sudo vim /etc/apache2/apache2.conf # add NameVirtualHost *:80 BEFORE "Include sites-enabled/"

Create a new apache configuration inside /etc/apache2/sites-available: sudo touch /etc/apache2/sites-available/exampleapp

Paste the following into it ServerName exampleapp ServerAlias *.exampleapp ServerAdmin webmaster@localhost

DocumentRoot <path to bootstrap-zf-example>/public

ErrorLog ${APACHE_LOG_DIR}/nostradamus-error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/bootstrap-zf-example-access.log combined

<Directory "<path to bootstrap-zf-example>/public">
AllowOverride All
Options +ExecCGI
Order allow,deny
Allow from all

Add a new DNS entry to /etc/hosts: su echo " exampleapp" >> /etc/hosts

Enable vhost: sudo a2ensite exampleapp

Restart apache: sudo /etc/init.d/apache2 reload

Create a new MySQL database: mysqladmin create bootstrap_zf_example -u root -p

Download Addendum (annotations support for PHP) from and extract it to /library. Addendum is not shipped with this examples.

Edit application/config/application.ini so that the MySQL settings are correct.

Database migrations

The script data/ dumps the schema (tables, views and rows) from your development environment into the create-tables.sql, create-views.sql and fixture.sql.

If you have done a direct migration in your development database, let's say you added a new column, just run ./ and your unit test environment will be updated to the new schema.

Unit tests

Change to /tests and execute phpunit PHPUnit must be installed.

Something went wrong with that request. Please try again.