echo <<<EOS ***************************** ZF ERROR ******************************** In order to run the zf command, you need to ensure that Zend Framework is inside your include_path. If you are running this tool without ZendFramework in your include_path, you can alternatively set one of two environment variables to for this tool to work: a) ZEND_TOOL_INCLUDE_PATH_PREPEND="/path/to/ZendFramework/library" OR alternatively b) ZEND_TOOL_INCLUDE_PATH="/path/to/ZendFramework/library" The former (a) will make the specified Zend Framework first in the include_path whereas the latter (b) will replace the include_path with the specified path. Information: EOS; echo ' original include_path: ' . $_zf['original'] . PHP_EOL; echo ' attempted include_path: ' . get_include_path() . PHP_EOL; echo ' script location: ' . $_SERVER['SCRIPT_NAME'] . PHP_EOL; exit(1); } // cleanup the global space unset($_zf); // run tool Zend_Tool_Framework_Client_Console::main(); exit(0);
function zf_run($zfConfig) { global $_zf; unset($_zf); $configOptions = array(); if (isset($zfConfig['CONFIG_FILE'])) { $configOptions['configFilepath'] = $zfConfig['CONFIG_FILE']; } if (isset($zfConfig['CONFIG_FILE'])) { $configOptions['storageDirectory'] = $zfConfig['STORAGE_DIR']; } Zend_Tool_Framework_Client_Console::main($configOptions); }