This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | After set zend framework in NetBeans, the zf.sh does not work | ||
---|---|---|---|
Product: | php | Reporter: | hantsy <hantsy> |
Component: | Zend | Assignee: | Tomas Mysik <tmysik> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | fzamboj |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
hantsy
2010-06-06 03:10:19 UTC
When I removed the ~/.zf.ini file , it works. Well, I noticed this behaviour as well but I think that this has nothing to do with NetBeans because we only call zf.sh/zf.bat - first, create config and then adjust config (add our commands provider). So, I think that this could be a bug in ZF itself? But first, I need to verify it, I will update this issue. Thanks for reporting. I can be wrong of course but as I already wrote - a bug in ZF. Have a look into the generated .zf.ini - there's "php.includepath" key in it. This is incorrect, it should be "php.include_path" (at least this is the correct name according to php.ini file and if I changed it manually, zf.sh works again). So, feel free to submit a bug against ZF. Thanks. The ~/.zf.ini is generated by NetBeans or by ZF itself(utilize zf API to generate). If it is the former, this maybe a NetBeans bug. I do not research the netbeans ZF module source code now. I'll have a look on this to see if it's our or zf bug. NB calls zf create config and that's the command that creates ~/.zf.ini. If you call this from cli without using NB then the result is: -- php.includepath = "/home/felipee/zend/ZendFramework-1.10.0/library:.:/usr/local/lib/php:/usr/share/php" -- so it looks like that the problem is on ZF side. (In reply to comment #4) > The ~/.zf.ini is generated by NetBeans or by ZF itself(utilize zf API to > generate). > If it is the former, this maybe a NetBeans bug. > I do not research the netbeans ZF module source code now. Already answered, see Comment #2. I reproduced by the following steps... the problem maybe cause by NetBeans. So I think it is a bug introduced by NetBeans. 1. create config by zf cli. [hantsy@localhost public_html]$ /home/hantsy/libs/php/zf/bin/zf.sh create config Successfully written Zend Tool config. It is located at: /home/hantsy/.zf.ini 2. show the config, it created a php.includepath entry in the file, not ***php.include_path*** described before. [hantsy@localhost public_html]$ /home/hantsy/libs/php/zf/bin/zf.sh show config User Configuration: /home/hantsy/.zf.ini `-- php `-- includepath: /home/hantsy/libs/php/ZendFramework-1.10.5/library:.:/usr/share/pear:/usr/share/php 3.create a project for test, it works well. [hantsy@localhost public_html]$ /home/hantsy/libs/php/zf/bin/zf.sh create project testzf Creating project at /home/hantsy/public_html/testzf Note: This command created a web project, for more information setting up your VHOST, please see docs/README 4.In this step, the zf.in content is the following. [hantsy@localhost public_html]$ cat ~/.zf.ini php.includepath = "/home/hantsy/libs/php/ZendFramework-1.10.5/library:.:/usr/share/pear:/usr/share/php" 5.Removed the config file, then I used NetBeans to generate it. [hantsy@localhost public_html]$ rm ~/.zf.ini -f 6.Startup NetBeans IDE 6.9RC and open Options->PHP->Zend, specify the zf.sh location and click the register provider button. 7. A new zf.ini is generated. The content is following. ***it is different from the former generated by command*** [hantsy@localhost public_html]$ cat ~/.zf.ini php.includepath = "/home/hantsy/libs/php/ZendFramework-1.10.5/library:/home/hantsy/devtools/netbeans/php/zend:.:/usr/share/pear:/usr/share/php" basicloader.classes.0 = "NetBeansCommandsProvider" 8. Create a proejct for test, the problem is here. [hantsy@localhost public_html]$ /home/hantsy/libs/php/zf/bin/zf.sh create project testzf2 PHP Warning: include_once(NetBeansCommandsProvider.php): failed to open stream: No such file or directory in /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Loader.php on line 146 PHP Stack trace: PHP 1. {main}() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:0 PHP 2. ZF::main() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:632 PHP 3. ZF->run() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:74 PHP 4. ZF->_runTool() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:117 PHP 5. Zend_Tool_Framework_Client_Abstract->dispatch() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:608 PHP 6. Zend_Tool_Framework_Client_Abstract->initialize() /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Abstract.php:223 PHP 7. Zend_Tool_Framework_Loader_BasicLoader->load() /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Abstract.php:122 PHP 8. Zend_Loader::loadClass() /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Tool/Framework/Loader/BasicLoader.php:110 PHP 9. Zend_Loader::loadFile() /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Loader.php:94 Warning: include_once(NetBeansCommandsProvider.php): failed to open stream: No such file or directory in /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Loader.php on line 146 Call Stack: 0.0019 437672 1. {main}() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:0 0.0020 437672 2. ZF::main() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:632 0.0100 726260 3. ZF->run() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:74 0.0100 726260 4. ZF->_runTool() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:117 0.0120 803244 5. Zend_Tool_Framework_Client_Abstract->dispatch() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:608 0.0120 803244 6. Zend_Tool_Framework_Client_Abstract->initialize() /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Abstract.php:223 0.0379 1723184 7. Zend_Tool_Framework_Loader_BasicLoader->load() /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Abstract.php:122 0.1226 4017828 8. Zend_Loader::loadClass() /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Tool/Framework/Loader/BasicLoader.php:110 0.1226 4018116 9. Zend_Loader::loadFile() /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Loader.php:94 PHP Warning: include_once(): Failed opening 'NetBeansCommandsProvider.php' for inclusion (include_path='/home/hantsy/libs/php/ZendFramework-1.10.5/library:.:/usr/share/pear:/usr/share/php') in /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Loader.php on line 146 PHP Stack trace: PHP 1. {main}() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:0 PHP 2. ZF::main() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:632 PHP 3. ZF->run() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:74 PHP 4. ZF->_runTool() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:117 PHP 5. Zend_Tool_Framework_Client_Abstract->dispatch() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:608 PHP 6. Zend_Tool_Framework_Client_Abstract->initialize() /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Abstract.php:223 PHP 7. Zend_Tool_Framework_Loader_BasicLoader->load() /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Abstract.php:122 PHP 8. Zend_Loader::loadClass() /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Tool/Framework/Loader/BasicLoader.php:110 PHP 9. Zend_Loader::loadFile() /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Loader.php:94 Warning: include_once(): Failed opening 'NetBeansCommandsProvider.php' for inclusion (include_path='/home/hantsy/libs/php/ZendFramework-1.10.5/library:.:/usr/share/pear:/usr/share/php') in /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Loader.php on line 146 Call Stack: 0.0019 437672 1. {main}() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:0 0.0020 437672 2. ZF::main() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:632 0.0100 726260 3. ZF->run() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:74 0.0100 726260 4. ZF->_runTool() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:117 0.0120 803244 5. Zend_Tool_Framework_Client_Abstract->dispatch() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:608 0.0120 803244 6. Zend_Tool_Framework_Client_Abstract->initialize() /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Abstract.php:223 0.0379 1723184 7. Zend_Tool_Framework_Loader_BasicLoader->load() /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Abstract.php:122 0.1226 4017828 8. Zend_Loader::loadClass() /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Tool/Framework/Loader/BasicLoader.php:110 0.1226 4018116 9. Zend_Loader::loadFile() /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Loader.php:94 PHP Fatal error: Uncaught exception 'Zend_Exception' with message 'File "NetBeansCommandsProvider.php" does not exist or class "NetBeansCommandsProvider" was not found in the file' in /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Loader.php:99 Stack trace: #0 /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Tool/Framework/Loader/BasicLoader.php(110): Zend_Loader::loadClass('NetBeansCommand...') #1 /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Abstract.php(122): Zend_Tool_Framework_Loader_BasicLoader->load() #2 /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Abstract.php(223): Zend_Tool_Framework_Client_Abstract->initialize() #3 /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php(608): Zend_Tool_Framework_Client_Abstract->dispatch() #4 /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php(117): ZF->_runTool() #5 /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php(74): ZF->run() #6 /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php(632): ZF::m in /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Loader.php on line 99 Zend_Exception: File "NetBeansCommandsProvider.php" does not exist or class "NetBeansCommandsProvider" was not found in the file in /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Loader.php on line 99 Call Stack: 0.0019 437672 1. {main}() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:0 0.0020 437672 2. ZF::main() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:632 0.0100 726260 3. ZF->run() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:74 0.0100 726260 4. ZF->_runTool() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:117 0.0120 803244 5. Zend_Tool_Framework_Client_Abstract->dispatch() /home/hantsy/libs/php/ZendFramework-1.10.5/bin/zf.php:608 0.0120 803244 6. Zend_Tool_Framework_Client_Abstract->initialize() /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Abstract.php:223 0.0379 1723184 7. Zend_Tool_Framework_Loader_BasicLoader->load() /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Abstract.php:122 0.1226 4017828 8. Zend_Loader::loadClass() /home/hantsy/libs/php/ZendFramework-1.10.5/library/Zend/Tool/Framework/Loader/BasicLoader.php:110 ***Please explain why you think this is a bug of ZF itself*** (In reply to comment #8) > I reproduced by the following steps... the problem maybe cause by NetBeans. > So I think it is a bug introduced by NetBeans. Wrong, reasons explained earlier. I will try to use another words - NetBeans does _not_ generate ZF config, "php.includepath" _is_ incorrect. Why is it visible after NetBeans registers its provider? Answer is already contained in the question itself - because NetBeans adds one entry right to the include path (NetBeansCommandsProvider must be available and is located inside NetBeans installation directory) - that is why ZF tool itself complains because it cannot find the NB provider (the second line in ZF config). NetBeans does not complain because it adds this directory "manually" for every command (in order to work with ZF version 1.9 and older) so the NB provider is always found. OK, I see. NetBeans adds extra php include path at runtime, so the php.inludepath is ignored. Zend tools read the config file, but can not recognise the php.includepath entry. Is that right? I will report this problem in ZF website. Thanks. (In reply to comment #10) > NetBeans adds extra php include path at runtime, so the php.inludepath is > ignored. Yes. > Zend tools read the config file, but can not recognise the > php.includepath entry. > Is that right? Yes. > I will report this problem in ZF website. Perfect! Thanks for reporting. |