title: Couldnt load Zend/Application.php when move project from win7 to Ubuntu
body: <p>I have a project running in win7 (with xampp installed - zend framework 1.10.3). But when I moved it to Ubuntu, I had a problem.
  My project structure is :</p>
  
  <pre><code>Myproject
      application
      library
          Zend
      include
          application.ini
      etc...
      index.php
  </code></pre>
  
  <p>Here is my index.php:</p>
  
  <pre><code>&lt;?php
  
  // Define path to application directory
  defined('APPLICATION_PATH')
      || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/application'));
  
  // Define application environment
  defined('APPLICATION_ENV')
      || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
  
  define('APP_ROOT', realpath(dirname(dirname(__FILE__))));
  
  // Ensure library/ is on include_path
  set_include_path(implode(PATH_SEPARATOR, array(
      realpath(APPLICATION_PATH . '/../library'),
      get_include_path(),
  )));
  
  require_once 'include/constant.inc.php';
  require_once('include/class.phpmailer.php');
  
  // set constant in Zend_Registry
  //require_once 'Zend/Registry.php';
  //Zend_Registry::set('const', $cfg);
  
  /** Zend_Application */
  require_once 'Zend/Application.php';
  
  // Create application, bootstrap, and run
  $application = new Zend_Application(
      APPLICATION_ENV,
      APPLICATION_PATH . '/../include/application.ini'
  );
  $application-&gt;bootstrap()
              -&gt;run();
  </code></pre>
  
  <p>And here is my include/application.ini:</p>
  
  <pre><code>[production]
  phpSettings.display_startup_errors = 1
  phpSettings.display_errors = 1
  phpSettings.date.timezone = "Europe/London"
  ;includePaths.library = APPLICATION_PATH "/../library"
  bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
  bootstrap.class = "Bootstrap"
  appnamespace = ""
  
  ;resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
  ;resources.frontController.params.displayExceptions = 0
  resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
  resources.modules = ""
  
  autoloaderNamespaces.Zendex = "Zendex_"
  
  
  resources.db.adapter = PDO_MYSQL
  resources.db.params.host = localhost
  resources.db.params.username = root
  resources.db.params.password = 
  resources.db.params.dbname = qtcms
  resources.db.params.charset = "utf8"
  
  
  resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
  resources.view[] =
  ;resources.layout.layout = "layout"
  admin.resources.layout.layout = "admin"
  resources.view.doctype = "XHTML1_STRICT"
  resources.view.helperPath    = APPLICATION_PATH "/helpers/views/"
  resources.view.helperPathPrefix = "Zend_View_Helper_"
  ;resources.view.params.default.basePath                            = APPLICATION_PATH "/layouts/default/"
  ;resources.view.params.default.layout                              = "layout"
  ;resources.view.params.default.layoutPath                          = APPLICATION_PATH "/layouts/default/default/"
  
  ;resources.view.params.admin.basePath                            = APPLICATION_PATH "/layouts/admin/"
  ;resources.view.params.admin.layout                              = "layout"
  ;resources.view.params.admin.layoutPath                          = APPLICATION_PATH "/layouts/admin/default/"
  
  
  
  [staging : production]
  
  [testing : production]
  phpSettings.display_startup_errors = 1
  phpSettings.display_errors = 1
  
  [development : production]
  phpSettings.display_startup_errors = 1
  phpSettings.display_errors = 1
  resources.frontController.params.displayExceptions = 1
  </code></pre>
  
  <p>With these configurations, I have no problem on having my project run on windows (with xampp was installed).</p>
  
  <p>In ubuntu, i had xampp installed following this guide:</p>
  
  <pre><code>http://humanlanguage.wordpress.com/2006/12/03/install-xampp-on-ubuntu/
  </code></pre>
  
  <p>According to that guidance, I've created a symlink (if i didnt wrong) to linking my <strong>/home/truong/webdev</strong> folder with <strong>/opt/lampp/htdocs</strong> folder.(with "truong" is my name ^_^)
  Then i moved my project to /home/truong/webdev. After that, I run my project from browser ULR : <strong>localhost/webdev/myProject</strong>
  and i had this error:</p>
  
  <pre><code>Warning: require_once(Zend/Application.php) [function.require-once]: failed to open stream: No such file or directory in /home/truong/webdev/qtcms/index.php on line 28
  
  Fatal error: require_once() [function.require]: Failed opening required 'Zend/Application.php' (include_path=':.:/opt/lampp/lib/php') in /home/truong/webdev/qtcms/index.php on line 28
  </code></pre>
  
  <p>It looks like that the system couldn't find my library/Zend folder.</p>
  
  <p>I wondered that should i set the include path for my Zend library in php.ini manually, but then I thought it wasnt neccessary, cause I had it set in index.php</p>
  
  <pre><code>// Ensure library/ is on include_path
  set_include_path(implode(PATH_SEPARATOR, array(
              realpath(APPLICATION_PATH . '/../library'),
              get_include_path(),
  )));
  </code></pre>
  
  <p>I've searched many times on the Internet but nothing found helpful.
  Please help me solving this problem...
  Thanks so much.
  ps: my appologize for my bad English.
  quangtruong1985</p>
  
  <p>Posts: 1
  Joined: Thu Jan 06, 2011 4:24 pm</p>