{"id":243,"date":"2022-08-30T14:58:06","date_gmt":"2022-08-30T14:58:06","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/08\/31\/zend-beginner-undefined-index-home-when-using-zend_tool-record-and-share-programming-errors\/"},"modified":"2022-08-30T14:58:06","modified_gmt":"2022-08-30T14:58:06","slug":"zend-beginner-undefined-index-home-when-using-zend_tool-record-and-share-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/zend-beginner-undefined-index-home-when-using-zend_tool-record-and-share-programming-errors\/","title":{"rendered":"Zend beginner: undefined index: HOME when using Zend_Tool-Record and share programming errors"},"content":{"rendered":"<p>I&#8217;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:<\/p>\n<pre><code>&gt; zf create action add index\n\nPHP Notice:  Undefined index:  HOME in C:\\apps\\zend\\bin\\zf.php on line 51\nPHP Stack trace:\nPHP   1. {main}() C:\\apps\\zend\\bin\\zf.php:0\nPHP   2. zf_main() C:\\apps\\zend\\bin\\zf.php:23\nPHP   3. zf_setup_home_directory() C:\\apps\\zend\\bin\\zf.php:31\n<\/code><\/pre>\n<p>Line 51 reads like this:<\/p>\n<pre><code>\/\/ check for explicity set ENV var ZF_HOME\nif (($zfHome = getenv('ZF_HOME')) &amp;&amp; file_exists($zfHome)) {\n    $_zf['HOME'] = $zfHome;\n} elseif (($home = getenv('HOME'))) {\n    $_zf['HOME'] = $home;\n} elseif (($home = getenv('HOMEPATH'))) {\n    $_zf['HOME'] = $home;\n}\n\n$homeRealpath = realpath($_zf['HOME']);\n<\/code><\/pre>\n<p>So I figure I have to set an environment variable, but I&#8217;m just not sure what it should point to?<\/p>\n<ol>\n<li>\n<p>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.<\/p>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-08-31 06:06:27. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;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: &gt; 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() [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,8],"tags":[],"class_list":["post-243","post","type-post","status-publish","format-standard","hentry","category-uncategorized","category-zend-framework"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=243"}],"version-history":[{"count":1,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/243\/revisions"}],"predecessor-version":[{"id":8903,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/243\/revisions\/8903"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}