Note that there are some explanatory texts on larger screens.

plurals
  1. POFatal error: Class 'Zend_Controller_Action' not found
    primarykey
    data
    text
    <p>I've found some answers that are closely related to this problem, but I still can't get it resolved. I believe folks are saying that something is not correct with my include path, but I've tried all resolutions I could find to no avail.</p> <p>Here's the error:</p> <pre><code>Fatal error: Class 'Zend_Controller_Action' not found in /Users/*me*/Sites/*site*/application/controllers/IndexController.php on line 3 </code></pre> <p>Here's the include statements:</p> <pre><code>$newIncludePath = array(); $newIncludePath[] = '.'; $newIncludePath[] = 'include'; $newIncludePath[] = get_include_path(); $newIncludePath[] = '../library'; $newIncludePath[] = '../application/classes/'; $newIncludePath[] = '../application/models/'; $newIncludePath[] = '../application/models/'; $newIncludePath[] = '../application/controllers'; $newIncludePath = implode(PATH_SEPARATOR, $newIncludePath); set_include_path($newIncludePath); require_once 'Zend/Controller/Front.php'; require_once 'Zend/Loader.php'; Zend_Loader::registerAutoload(); </code></pre> <p>I have been banging my head on the keyboard for hours scouring the forums. I'm new to zend and php. This stuff has given me a royal headache. I've explicitly added controllers into the path. I have no idea what I am overlooking.</p> <p>btw, the <em>me</em> and <em>site</em> are redacted names for privacy reasons.</p> <p>I am eternally grateful for a resolution.</p> <p>mjs-edit:</p> <p>I noticed my includes were a bit wonky. So here's a do-over:</p> <pre><code>$newIncludePath = array(); $newIncludePath[] = '.'; $newIncludePath[] = get_include_path(); $newIncludePath[] = '../library'; $newIncludePath[] = '../application/classes/'; $newIncludePath[] = '../application/models/'; $newIncludePath[] = '../application/library/'; $newIncludePath = implode(PATH_SEPARATOR, $newIncludePath); set_include_path($newIncludePath); </code></pre> <p>The output of var_dump:</p> <pre><code>string(148) "../application/controllers:.:.:/Applications/MAMP/bin/php5/lib/php:../library:../application/classes/:../application/models/:../application/library/" </code></pre> <p>I noticed that Zend/Controller/Action exists under ../library. So, I don't understand why the app can't find it.</p> <p>If I run IndexController from PHPDebug, it returns</p> <pre><code>string(170) ".:/Users/me/Sites/site:/Applications/Zend/Zend Studio - 7.1.0/plugins/org.zend.php.framework.resource_7.1.0.v20091101-1523/resources/ZendFramework-1/library/" Fatal error: Class 'Zend_Controller_Action' not found in /Users/me/Sites/site/application/controllers/IndexController.php on line 5 </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload