php - NetBeans's include path doesn't work -
i have netbeansproject works on zendframework (the library) , uses phpunit tests each time function of zend framework called (the bootstrap file calls them example) gives fatal error because can't find files: fatal error: require_once(): failed opening required 'zend/db/table/abstract.php' (include_path='.;c:\xampp\htdocs\pear;c:\xampp\php\pear') in....
my bootstrap file looks this:
<?php ini_set('display_startup_errors', 1); ini_set('display_errors', 2); 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') : 'testing')); defined('library_path') || define('library_path', realpath(dirname(__file__) . '/../library')); defined('tests_path') || define('tests_path', realpath(dirname(__file__))); //define constant global variable defined('_foo_root_dir_') || define('_foo_root_dir_', dirname(dirname(__file__))); defined('_foo_app_dir_') || define('_foo_app_dir_', _foo_root_dir_ . '/application'); defined('_foo_lib_dir_') || define('_foo_lib_dir_', _foo_root_dir_ . '/library'); defined('_foo_public_dir_') || define('_foo_public_dir_', _foo_root_dir_ . '/public'); defined('_foo_test_dir_') || define('_foo_test_dir_', _foo_root_dir_ . '/tests'); defined('_foo_zf_dir_') || define('_foo_zf_dir_', 'c:\zend\zendframework-1.11.11\library'); require_once 'zend/db/table/abstract.php'; . . . . #end of bootstrap.php and require_once triggers error. if example modify bootstrap file , instead of doing require 'zend/db/table/abstract.php' _foo_zf_dir_.'/zend/db/table/abstract.php' problem gets solved, have rewrite every single include every single file of zend library.
the path framework on include correct, , have configured phpunit bootstrap file partially copied above , phpunit.xml given me partner has project set , running.
the phpunit.xml looks (i don't know if it's relevant topic):
<phpunit bootstrap="./bootstrap.php" colors="true"> <testsuite name="applicationtestsuite"> <directory>./application/</directory> <directory>./library/</directory> </testsuite> <filter> <whitelist> <directory suffix=".php">../application</directory> <exclude> <directory suffix=".php">../application/modules/pal</directory> <directory suffix=".phtml">../application/views</directory> <file>../application/bootstrap.php</file> </exclude> </whitelist> </filter> <logging> <log type="coverage-html" target="./log/coveragereport" charset="utf-8" yui="true" highlight="false" lowupperbound="35" highlowerbound="70"/> </logging> </phpunit> i have configured zend tab on options tools, registering provider , such. how fix netbeans can detect includes have found not in relation project folder in relation included library path?
i've tried include library through global php includes , project specific ones (through project properties) , neither of them works...
thank in advance
solved! forgot include path zendframework library on php.ini file.
this had: include_path=".;c:\xampp\htdocs\pear;c:\xampp\php\pear"
and required work: include_path=".;c:\xampp\htdocs\pear;c:\xampp\php\pear;c:\zend\zendframework-1.11.11\library"
regards!
Comments
Post a Comment