This was surprisingly tricky to figure out, although that points more to the smoothness of setting up an application when it’s living in the site root. Sorry for the brevity here, this one is here mainly for my own reference but as it may help you out of a jam I thought I’d share.
- Follow the Quickstart Instructions over at the manual page, using the zf command line tool to create your application outside the webroot. I like to create a folder called
ZendApplicationsthat lives next to my ZendFramework folder
- Rename/mv the
publicfolder to whatever subdirectory off your site root you want your Zend Application to live (the titular Subdirectory)
Change the .htaccess file created by the
zftool so it has a
Tangential, but make sure your index.php page has your ZendFramwork library in its page. If you don’t want to add it to your php.ini, you can add it in with
ini_set('include_path', ini_get('include_path') .
Also in index.php, change the application path from
realpath(dirname(__FILE__) . '/../application'to the folder where you created your project
This hasn’t been tested extensively, there may be other path assumptions that the Framework or
Zend_Tool makes, so use it at your own risk.