Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>add magento's library folder to include path in index.php:</p> <pre><code>//define shortcut for DIRECTORY_SEPARATOR defined('DS') || define('DS', DIRECTORY_SEPARATOR); //define base bath obtainable throughout the whole application defined('BASE_PATH') || define('BASE_PATH', realpath(dirname(__FILE__) . DS . '..' . DS . 'basedir' . DS)); //define path to application directory defined('APPLICATION_PATH') || define('APPLICATION_PATH', BASE_PATH . DS . 'app'); //set include path to libraries set_include_path(BASE_PATH . DS . 'library' . PATH_SEPARATOR . MAGENTO_DIR . DS . 'lib' . PATH_SEPARATOR . get_include_path()); </code></pre> <p><strong>But with this approach you can't use latest ZF version. So separate install is my choice.</strong> </p> <p>autoloader works, easy way here is to place original Zend/Loader/ into your application library, or include all required autoloader classes manually(just 3: loader, autoloader, Zend_Exception)</p> <p>Here is my full projectName/public/index.php:</p> <pre><code>if (get_magic_quotes_gpc()) { function stripslashes_deep($value) { $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value); return $value; } $_POST = array_map('stripslashes_deep', $_POST); $_GET = array_map('stripslashes_deep', $_GET); $_COOKIE = array_map('stripslashes_deep', $_COOKIE); $_REQUEST = array_map('stripslashes_deep', $_REQUEST); } //define shortcut for DIRECTORY_SEPARATOR defined('DS') || define('DS', DIRECTORY_SEPARATOR); //define base bath obtainable throughout the whole application defined('BASE_PATH') || define('BASE_PATH', realpath(dirname(__FILE__) . DS . '..' . DS . 'basedir')); //define path to application directory defined('APPLICATION_PATH') || define('APPLICATION_PATH', BASE_PATH . DS . 'app'); //set include path to libraries set_include_path(BASE_PATH . DS . 'library' . PATH_SEPARATOR . get_include_path()); //bootstrap, and run application try { require_once 'Zend/Application.php'; //create application and configure it. $application = new Zend_Application( getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production', array('config' =&gt; array(APPLICATION_PATH . DS . 'configs' . DS . 'application.ini')) ); //run application $application-&gt;bootstrap()-&gt;run(); } catch (Exception $e) { //here was logging logic } </code></pre> <p>This is how your /localsite/fbtest/public/index.php may look:</p> <pre><code>if (get_magic_quotes_gpc()) { function stripslashes_deep($value) { $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value); return $value; } $_POST = array_map('stripslashes_deep', $_POST); $_GET = array_map('stripslashes_deep', $_GET); $_COOKIE = array_map('stripslashes_deep', $_COOKIE); $_REQUEST = array_map('stripslashes_deep', $_REQUEST); } //define shortcut for DIRECTORY_SEPARATOR defined('DS') || define('DS', DIRECTORY_SEPARATOR); //define base bath obtainable throughout the whole application //keep your libraries and application out of public directory defined('BASE_PATH') || define('BASE_PATH', realpath(dirname(__FILE__) . DS . '..' . DS . 'basedir')); //define path to application directory defined('APPLICATION_PATH') || define('APPLICATION_PATH', BASE_PATH . DS . 'application'); //if index.php in /localsite/fbtest/public/ defined('MAGENTO_PATH') || define('MAGENTO_PATH', realpath(dirname(__FILE__) . DS . '..' . DS . '..' . DS . 'products')); //set include path to libraries //noticed magento library added? set_include_path(BASE_PATH . DS . 'library' . PATH_SEPARATOR . MAGENTO_PATH . DS . 'lib' . PATH_SEPARATOR . get_include_path()); //bootstrap, and run application try { require_once 'Zend/Application.php'; require_once 'Zend/Loader.php'; require_once 'Zend/Loader/Autoloader.php'; require_once 'Zend/Exception.php'; //create application and configure it. $application = new Zend_Application( getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production', array('config' =&gt; array(APPLICATION_PATH . DS . 'configs' . DS . 'application.ini')) ); //run application $application-&gt;bootstrap()-&gt;run(); } catch (Exception $e) { //here was logging logic } </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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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