Zend beginner: undefined index: HOME when using Zend_Tool-Record and share programming errors
I’ve just installed Zend Framework and am running through a tutorial, but have hit a small stumbling block. Using the Zend_Tool to create new actions gives me an error:
> zf create action add index
PHP Notice: Undefined index: HOME in C:\apps\zend\bin\zf.php on line 51
PHP Stack trace:
PHP 1. {main}() C:\apps\zend\bin\zf.php:0
PHP 2. zf_main() C:\apps\zend\bin\zf.php:23
PHP 3. zf_setup_home_directory() C:\apps\zend\bin\zf.php:31
Line 51 reads like this:
// check for explicity set ENV var ZF_HOME
if (($zfHome = getenv('ZF_HOME')) && file_exists($zfHome)) {
$_zf['HOME'] = $zfHome;
} elseif (($home = getenv('HOME'))) {
$_zf['HOME'] = $home;
} elseif (($home = getenv('HOMEPATH'))) {
$_zf['HOME'] = $home;
}
$homeRealpath = realpath($_zf['HOME']);
So I figure I have to set an environment variable, but I’m just not sure what it should point to?
-
I found the problem was that I was using an administrator command line. If I ran the same command as my regular user account I avoided this problem.
Originally posted 2013-08-31 06:06:27.