Zend Framework Setup

Zend Framework Setup

Like all things to be done, this should be the simplest, just drag, drop and boom a page would automagically appear.

Well that only happens in fairy tales, and it seems that we are in the real world over here. The setup seems to be fairly easy, download a copy of the framework, unzip and install.

That was not to be, while Zend Framework as a recommended project layout (http://www.framework.zend.com/manual/en/project-structure.project.html), it assumes that the project will be installed in the document root, which is not possible since each of the developers uses their web server installations for multiple projects

Following instructions onĀ http://www.alberton.info/zend_framework_mod_rewrite_shared_hosting.html, we tweaked the .htaccess file in the public folder to include the project sub-folder on the web server and we ended up with


RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ /project/public/index.php [NC,L]

Note the name of the project which means that we can deploy in any location by replacing project with the name of the sub-folder. This also works on Linux too…

One issue down, not sure what the next one will be

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top