开发者

Zend Framework - Create db-table from database - Error

开发者 https://www.devze.com 2023-03-02 16:28 出处:网络
After I do: zf -p create dbtable.from-database I get: Cannot redeclare class Zend_Loader in /home/user/public_html/proj.dev/library/Zend/Loader.php on line 31

After I do:

zf -p create dbtable.from-database

I get:

Cannot redeclare class Zend_Loader in /home/user/public_html/proj.dev/library/Zend/Loader.php on line 31

If we change the application.ini file generated and we commented the following line:

;includePaths.library = APPLICATION_PATH "/../library"

This seemed to work, and since we already have this on your public/index.php file,开发者_Go百科 it seems that this is ok to comment.

However, I do not understand what is the relation between the provided error, and the lucky solution.

Does anyone know why this happened ?


Usually this error occurs when include_path is set twice! You have set the include_path somewhere else already.


I got the same error when I tried to run zf create dbtable.from-database

Found out what the issue was. My zf command was being run from /usr/local/zend/share/ZendFramework/library/Zend but my project had it's own Zend Framework located at /Applications/MAMP/htdocs/NPT2/library/Zend

What I did to fix the error was remove the Zend folder in my project's library folder, and then set include_path in my php.ini file to point to /usr/local/zend/share/ZendFramework/library

See if that works for you.

0

精彩评论

暂无评论...
验证码 换一张
取 消