doujiang9887 2013-01-02 20:07
浏览 98
已采纳

NetBeans Include Path未被完全搜索,无论是项目,全局还是PHP

I am having a great deal of trouble with NetBeans 7.2.1 using PHP and the Include Path. This may or may not be related to Netbeans PHP Include Path seems unused, either Project or Global where I state that NetBeans is not using its Project or Global Include Path. However, in this case, NetBeans is not searching the entire PHP Include_Path variable.

The PHP Include_Path is listed in the error messages. The file AutoloaderFactory.php is in D:\PHP\zf2-tutorial\vendor\zendframework\zendframework\library\Zend\Loader;

However, when I try to use NetBeans/Tools/Create PHPUnit Tests, I receive a series of warning and error messages saying that AutoloaderFactory.php is not found. These messages search only three of the provided libraries which do not include the library with the required class.

As a NetBeans noob, I am obviously not understanding something about it. But, I can't build my project because it won't find the required classes no matter what I do, including using Project, Globabl and PHP Include Paths. Can someone help me?

The error messages are included below. Thanks...RG

PHPUnit Skeleton Generator 1.2.0 by Sebastian Bergmann.

Warning: include(D:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\Zend\Loader\AutoloaderFactory.php): failed to open stream: No such file or directory in D:\PHP\zf2-tutorial\init_autoloader.php on line 38

Call Stack:
    0.0007     321856   1. {main}() K:\phpunit-skelgen:0
    0.0062     472944   2. SebastianBergmann\PHPUnit\SkeletonGenerator\Command::main() K:\phpunit-skelgen:45
    0.0167     980480   3. ReflectionClass->newInstanceArgs() K:\pear\SebastianBergmann\PHPUnit\SkeletonGenerator\Command.php:171
    0.0167     980936   4. SebastianBergmann\PHPUnit\SkeletonGenerator\TestGenerator->__construct() K:\pear\SebastianBergmann\PHPUnit\SkeletonGenerator\Command.php:171
    0.0178     987216   5. include_once('D:\PHP\zf2-tutorial\module\Album\src\Album\Controller\AlbumController.php') K:\pear\SebastianBergmann\PHPUnit\SkeletonGenerator\TestGenerator.php:125
    0.0213     993680   6. require_once('D:\PHP\zf2-tutorial\init_autoloader.php') D:\PHP\zf2-tutorial\module\Album\src\Album\Controller\AlbumController.php:4


Warning: include(): Failed opening 'D:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\Zend\Loader\AutoloaderFactory.php' for inclusion (include_path='D:\PHP\Includes;D:\PHP\zf2-tutorial;D:\PHP\ZendProjects\htdocs\Includes;D:\PHP\zf2-tutorial\vendor\zendframework\zendframework\library;D:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library;K:\pear') in D:\PHP\zf2-tutorial\init_autoloader.php on line 38

Call Stack:
    0.0007     321856   1. {main}() K:\phpunit-skelgen:0
    0.0062     472944   2. SebastianBergmann\PHPUnit\SkeletonGenerator\Command::main() K:\phpunit-skelgen:45
    0.0167     980480   3. ReflectionClass->newInstanceArgs() K:\pear\SebastianBergmann\PHPUnit\SkeletonGenerator\Command.php:171
    0.0167     980936   4. SebastianBergmann\PHPUnit\SkeletonGenerator\TestGenerator->__construct() K:\pear\SebastianBergmann\PHPUnit\SkeletonGenerator\Command.php:171
    0.0178     987216   5. include_once('D:\PHP\zf2-tutorial\module\Album\src\Album\Controller\AlbumController.php') K:\pear\SebastianBergmann\PHPUnit\SkeletonGenerator\TestGenerator.php:125
    0.0213     993680   6. require_once('D:\PHP\zf2-tutorial\init_autoloader.php') D:\PHP\zf2-tutorial\module\Album\src\Album\Controller\AlbumController.php:4


Fatal error: Class 'Zend\Loader\AutoloaderFactory' not found in D:\PHP\zf2-tutorial\init_autoloader.php on line 39

Call Stack:
    0.0007     321856   1. {main}() K:\phpunit-skelgen:0
    0.0062     472944   2. SebastianBergmann\PHPUnit\SkeletonGenerator\Command::main() K:\phpunit-skelgen:45
    0.0167     980480   3. ReflectionClass->newInstanceArgs() K:\pear\SebastianBergmann\PHPUnit\SkeletonGenerator\Command.php:171
    0.0167     980936   4. SebastianBergmann\PHPUnit\SkeletonGenerator\TestGenerator->__construct() K:\pear\SebastianBergmann\PHPUnit\SkeletonGenerator\Command.php:171
    0.0178     987216   5. include_once('D:\PHP\zf2-tutorial\module\Album\src\Album\Controller\AlbumController.php') K:\pear\SebastianBergmann\PHPUnit\SkeletonGenerator\TestGenerator.php:125
    0.0213     993680   6. require_once('D:\PHP\zf2-tutorial\init_autoloader.php') D:\PHP\zf2-tutorial\module\Album\src\Album\Controller\AlbumController.php:4
  • 写回答

2条回答 默认 最新

  • duanche4578 2013-01-08 22:04
    关注

    I totally purged NetBeans and reinstalled it. That included doing a registry clean after uninstalling NetBeans. At this point, the PHP Include_Path is being searched. I do not know whether or not the NetBeans Include_Path is being searched but that is another problem and I am not even sure why I should care since that won't matter after implementation. I'd be glad to hear a better answer.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 企业资源规划ERP沙盘模拟
  • ¥15 树莓派控制机械臂传输命令报错,显示摄像头不存在
  • ¥15 前端echarts坐标轴问题
  • ¥15 CMFCPropertyPage
  • ¥15 ad5933的I2C
  • ¥15 请问RTX4060的笔记本电脑可以训练yolov5模型吗?
  • ¥15 数学建模求思路及代码
  • ¥50 silvaco GaN HEMT有栅极场板的击穿电压仿真问题
  • ¥15 谁会P4语言啊,我想请教一下
  • ¥15 这个怎么改成直流激励源给加热电阻提供5a电流呀