I’ve set up my project on a new server getting prepared to go live. With that comes, moving around some files getting things ready. One thing I’m working on it getting the Zend_Tool command line working.
On the server, I’ve configured
When I run
zf.sh show doctrineit errors out because it’s trying to use my “development” DB config rather than the “production” one. I’m not sure how to get around this yet.
Not pretty, but you have to edit the source of the Zend Framework. The file to edit is
Here is the diff for what needs to be changed.
— BootstrapFile.php (saved version)
+++ (current document)
@@ -106,9 +106,11 @@
$applicationOptions = array();
$applicationOptions[‘config’] = $this->_applicationConfigFile->getPath();
+ $env = getenv(‘APPLICATION_ENV’) ? getenv(‘APPLICATION_ENV’) : ‘development’;
$this->_applicationInstance = new Zend_Application(
- $env, $applicationOptions ); } ,
Then you need to add the APPLICATION_ENV environmental variable to your shell.
In OS X, I’ve found this to work:
Insert this at the end of your
declare -x APPLICATION_ENV="local"
Now you can declare an environment in application.ini that works for the Zend Tool (and ZFDoctrine in my case).
Did this help you out? It took me a few days to piece together all this information together, I hope this saves you some time (who knows, maybe the future me will be thankful I wrote this down). Let me know your thoughts. email@example.com